The error I am getting:
/usr/local/lib/node_modules/npm/bin/npm-cli.js:85
let notifier = require('update-notifier')({pkg})
^^^
SyntaxError: Block-scoped declarations (let, const, function, class)
not yet supported outside strict mode
Try updating your Node version. This will globally update Node and npm and install the stable version:
n Helps with version handling.
About n : https://www.npmjs.com/package/n
sudo npm install -g npm
sudo npm install -g n
sudo n stable
If that doesn't work try:
sudo ln -sf /usr/local/n/versions/node/11.10.1/bin/node /usr/bin/node
This will install the latest node version and create a symbolic link.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.