sh: 1: node: Permission denied
node.js - sh: 1: node: Permission denied - Stack Overflow https://stackoverflow.com/questions/51811564/sh-1-node-permission-denied
npm config set user 0
npm config set unsafe-perm true
These issues happen because of broken packages. Go to the main folder. If using Linux use command
sudo rm -rf node_modules.
# 查看版本 node -v
# 清除npm cache npm cache clean -force
# 安装n模块 npm install -g n
# 不行就这样:npm install -g n -f
# 升级新版本(稳定版 stable ,最新版 latest ,指定版本号v8.11.1) n latest
# 查看版本号,确认是否升级成功 node -v