加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

angularjs – 安装Yo时被拒绝

发布时间:2020-12-17 09:27:27 所属栏目:安全 来源:网络整理
导读:我试图设置哟使用角度发生器为一个项目.我正在按照这里所述的步骤: http://yeoman.io/learning/index.html 我已经安装了Node.js和NPM. 但是当我使用命令: sudo npm install -g yo bower grunt-cli 它失败,我得到这个错误: spawn-sync@1.0.11 postinstall
我试图设置哟使用角度发生器为一个项目.我正在按照这里所述的步骤: http://yeoman.io/learning/index.html

我已经安装了Node.js和NPM.

但是当我使用命令:

sudo npm install -g yo bower grunt-cli

它失败,我得到这个错误:

> spawn-sync@1.0.11 postinstall /usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync
> node postinstall


fs.js:439
  return binding.open(pathModule._makeLong(path),stringToFlags(flags),mode);
                 ^
Error: EACCES,permission denied '/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/package.json'
    at Object.fs.openSync (fs.js:439:18)
    at Object.fs.writeFileSync (fs.js:978:15)
    at Object.<anonymous> (/usr/lib/node_modules/yo/node_modules/cross-spawn/node_modules/spawn-sync/postinstall.js:20:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:935:3
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! node v0.10.37
npm ERR! npm  v2.11.0
npm ERR! code ELIFECYCLE

npm ERR! spawn-sync@1.0.11 postinstall: `node postinstall`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the spawn-sync@1.0.11 postinstall script 'node postinstall'.
npm ERR! This is most likely a problem with the spawn-sync package,npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node postinstall
npm ERR! You can get their info via:
npm ERR!     npm owner ls spawn-sync
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/vincent/npm-debug.log

我试图在/usr/lib / node_modules上使用chmod 777,但似乎没有更好的工作.

我可以安装Bower和Grunt,它的工作,但是当我尝试安装Yo,它每次失败…

我不知道该怎么做,因为我尝试使用chmod或chown的一切都无效.

谢谢你的帮助!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读