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

相关文章:

  • 2021-09-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-13
  • 2021-11-14
  • 2021-12-06
  • 2021-05-22
相关资源
相似解决方案