【问题标题】:Installing gulp with npm使用 npm 安装 gulp
【发布时间】:2014-12-07 15:53:24
【问题描述】:

我正在尝试使用以下命令(带和不带 sudo)通过 npm 在 DigitalOcean 液滴上安装 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

根据this指南进行节点安装。

【问题讨论】:

    标签: node.js npm digital-ocean


    【解决方案1】:

    我遇到了同样的问题,安装早期版本的 gulp 对我有用:

    sudo npm install -g gulp@3.8.8
    

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

    还尝试了一系列涉及此处提到的解决方案的其他解决方案: NPM cannot install dependencies - Attempt to unlock something which hasn't been locked

    这些都不适合我。

    我得到的错误是:

    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
    

    【讨论】:

    • 您应该发布代码示例,而不是链接,因为不能保证链接是静态的。
    • 编辑高亮相关代码,链接仅供参考。
    猜你喜欢
    • 1970-01-01
    • 2019-05-31
    • 1970-01-01
    • 2017-10-10
    • 2016-10-11
    • 2017-11-02
    • 1970-01-01
    • 1970-01-01
    • 2020-06-07
    相关资源
    最近更新 更多