用npm安装gulp(Installing gulp with npm)

编程入门 行业动态 更新时间:2024-10-28 08:26:02
npm安装gulp(Installing gulp with npm)

我正在尝试使用以下命令(使用和不使用sudo)通过npm在DigitalOcean droplet上安装gulp:

npm install -g gulp

而我得到错误我无法弄清楚:

> v8flags@1.0.5 install /root/local/lib/node_modules/gulp/node_modules/v8flags > node fetch.js sh: 1: node: Permission denied npm ERR! Linux 3.13.0-24-generic npm ERR! argv "node" "/root/local/bin/npm" "install" "-g" "gulp" npm ERR! node v0.10.33 npm ERR! npm v2.1.11 npm ERR! code ELIFECYCLE npm ERR! v8flags@1.0.5 install: `node fetch.js` npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the v8flags@1.0.5 install script 'node fetch.js'. npm ERR! This is most likely a problem with the v8flags package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node fetch.js npm ERR! You can get their info via: npm ERR! npm owner ls v8flags npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /root/local/bin/npm-debug.log

节点安装是根据本指南进行的。

i am trying to install gulp via npm on DigitalOcean droplet with following command (with and without sudo):

npm install -g gulp

and im getting errors i cant figure out:

> v8flags@1.0.5 install /root/local/lib/node_modules/gulp/node_modules/v8flags > node fetch.js sh: 1: node: Permission denied npm ERR! Linux 3.13.0-24-generic npm ERR! argv "node" "/root/local/bin/npm" "install" "-g" "gulp" npm ERR! node v0.10.33 npm ERR! npm v2.1.11 npm ERR! code ELIFECYCLE npm ERR! v8flags@1.0.5 install: `node fetch.js` npm ERR! Exit status 127 npm ERR! npm ERR! Failed at the v8flags@1.0.5 install script 'node fetch.js'. npm ERR! This is most likely a problem with the v8flags package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node fetch.js npm ERR! You can get their info via: npm ERR! npm owner ls v8flags npm ERR! There is likely additional logging output above. npm ERR! Please include the following file with any support request: npm ERR! /root/local/bin/npm-debug.log

The node install is made according to this guide.

最满意答案

我有同样的问题,安装早期版本的gulp为我工作:

sudo npm install -g gulp@3.8.8

在这里找到: http : //forum.ionicframework.com/t/osx-error-v8flags-after-npm-update-ionic/13905/5

还尝试了一堆涉及此处提到的解决方案的其他解决方案: NPM无法安装依赖项 - 尝试解锁尚未锁定的内容

这些都不适合我。

我得到的错误是这样的:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied / node.js:815 var cwd = process.cwd(); ^ Error: EACCES, permission denied at Function.startup.resolveArgv0 (node.js:815:23) at startup (node.js:58:13) at node.js:906:3

I had the same issue, installing an earlier version of gulp worked for me:

sudo npm install -g gulp@3.8.8

Found this here: http://forum.ionicframework.com/t/osx-error-v8flags-after-npm-update-ionic/13905/5

Also tried a bunch of other solutions involving solutions as mentioned here: NPM cannot install dependencies - Attempt to unlock something which hasn't been locked

None of that worked for me.

The error I was getting was this:

shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied / node.js:815 var cwd = process.cwd(); ^ Error: EACCES, permission denied at Function.startup.resolveArgv0 (node.js:815:23) at startup (node.js:58:13) at node.js:906:3

更多推荐

本文发布于:2023-08-08 00:48:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466789.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:npm   gulp   Installing

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!