Unable to run node commands with new user
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I have two users: one old and another new. Both, my old user and my new user, can run node. But suddenly, with my new user, whenever I enter any command related to node I receive the same error copied below.
/usr/local/lib/node_modules/npm/bin/npm-cli.js:79
let notifier = require('update-notifier')(pkg)
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Please help me guys. And yes, node commands are still working on my old user.
command-line nodejs
add a comment |Â
up vote
0
down vote
favorite
I have two users: one old and another new. Both, my old user and my new user, can run node. But suddenly, with my new user, whenever I enter any command related to node I receive the same error copied below.
/usr/local/lib/node_modules/npm/bin/npm-cli.js:79
let notifier = require('update-notifier')(pkg)
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Please help me guys. And yes, node commands are still working on my old user.
command-line nodejs
2
With what method did you install node.js?
â MadMike
Jun 5 at 8:56
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have two users: one old and another new. Both, my old user and my new user, can run node. But suddenly, with my new user, whenever I enter any command related to node I receive the same error copied below.
/usr/local/lib/node_modules/npm/bin/npm-cli.js:79
let notifier = require('update-notifier')(pkg)
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Please help me guys. And yes, node commands are still working on my old user.
command-line nodejs
I have two users: one old and another new. Both, my old user and my new user, can run node. But suddenly, with my new user, whenever I enter any command related to node I receive the same error copied below.
/usr/local/lib/node_modules/npm/bin/npm-cli.js:79
let notifier = require('update-notifier')(pkg)
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3
Please help me guys. And yes, node commands are still working on my old user.
command-line nodejs
edited Jun 5 at 8:47
MadMike
3,76372144
3,76372144
asked Jun 5 at 6:57
![](https://lh6.googleusercontent.com/-IgXueRWp7Wk/AAAAAAAAAAI/AAAAAAAAABE/Wht01gZPZ7g/photo.jpg?sz=32)
![](https://lh6.googleusercontent.com/-IgXueRWp7Wk/AAAAAAAAAAI/AAAAAAAAABE/Wht01gZPZ7g/photo.jpg?sz=32)
Arjun Agnihotri
1
1
2
With what method did you install node.js?
â MadMike
Jun 5 at 8:56
add a comment |Â
2
With what method did you install node.js?
â MadMike
Jun 5 at 8:56
2
2
With what method did you install node.js?
â MadMike
Jun 5 at 8:56
With what method did you install node.js?
â MadMike
Jun 5 at 8:56
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:
$ node -v
To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:
$ node -v
To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
add a comment |Â
up vote
0
down vote
node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:
$ node -v
To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:
$ node -v
To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
node is the name of the Node.js snap package in all currently supported versions of Ubuntu. For example, to check your node version type:
$ node -v
To get rid of the error message in your question login as your new user and run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
edited Jun 5 at 10:14
answered Jun 5 at 10:07
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
![](https://i.stack.imgur.com/zqElV.png?s=32&g=1)
karel
49.5k11105126
49.5k11105126
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1043722%2funable-to-run-node-commands-with-new-user%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
2
With what method did you install node.js?
â MadMike
Jun 5 at 8:56