Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing gulp with npm

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:

> [email protected] 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! [email protected] install: `node fetch.js`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] 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.

like image 842
Nick Avatar asked Dec 07 '14 15:12

Nick


People also ask

What is gulp npm package?

What is gulp? Automation - gulp is a toolkit that helps you automate painful or time-consuming tasks in your development workflow. Platform-agnostic - Integrations are built into all major IDEs and people are using gulp with PHP, . NET, Node. js, Java, and other platforms.

How do I know if gulp is installed?

First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.


1 Answers

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

sudo npm install -g [email protected]

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
like image 196
Eric Grotke Avatar answered Sep 21 '22 05:09

Eric Grotke