欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

npm install 安装报错解决办法

程序员文章站 2022-05-30 16:30:03
...

npm install 安装报错解决办法

解决方案

报错——operation not permitted(没有许可证)

原因】npm的版本过高,导致一些依赖包下载不全

解决】npm install 后面增加–no-optional

npm install --no-optional

$ npm install --no-optional

[email protected] install /data/web/vue-datascreen/node_modules/yorkie
node bin/install.js

报错:Error: EACCES: permission denied

setting up Git hooks
{ Error: EACCES: permission denied, open '/data/web/vue-datascreen/.git/hooks/applypatch-msg'
    at Object.openSync (fs.js:434:3)
    at Object.writeFileSync (fs.js:1154:35)
    at write (/data/web/vue-datascreen/node_modules/yorkie/src/install.js:18:6)
    at createHook (/data/web/vue-datascreen/node_modules/yorkie/src/install.js:45:5)
    at /data/web/vue-datascreen/node_modules/yorkie/src/install.js:86:21
    at Array.map (<anonymous>)
    at installFrom (/data/web/vue-datascreen/node_modules/yorkie/src/install.js:83:10)
    at Object.<anonymous> (/data/web/vue-datascreen/node_modules/yorkie/bin/install.js:24:1)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/data/web/vue-datascreen/.git/hooks/applypatch-msg' }

提示没权限,需要修改当前目录文件权限

chmod 777 -R ./

再次执行则不报错

相关标签: Node Vue