question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't require a global gulp install

See original GitHub issue

I’ve currently got gulp in the devDependencies section of my package.json:

...
"gulp": "^3.9.0",
...

But when I go to run npm run gulp I get:

npm ERR! Linux 3.19.0-21-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "gulp"
npm ERR! node v0.12.5
npm ERR! npm  v2.11.2

npm ERR! missing script: gulp
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

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

I’m trying to get things to the point where I don’t have to install all the various nodejs-based tools globally on my build server. Would also help when onboarding so that people don’t keep running aground of missing tools.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
jmmcommented, Jul 1, 2015

@contra He’s trying to do npm run gulp from the shell.

@atrauzzi npm run is for arbitrary entries in package.json’s scripts. You can do what @contra said, or I think you might be able to get close to what you want with something like this in package.json (but then options passing gets a bit gnarly):

"scripts": {
  "gulp": "gulp"
}
1reaction
yocontracommented, Jul 1, 2015

You can npm install gulp locally and access the CLI via node_modules/.bin/gulp (which npm scripts will already do for you if you put gulp in a script) - not sure what the problem is here? You absolutely don’t need to install it globally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can I install just Gulp globally? - Stack Overflow
Gulp needs to be installed locally, but you can link the local install to a global install: npm install --global gulp npm link...
Read more >
How to install Gulp globally on Windows
Step 1) Download and install Node and npm. Step 2) Install the Gulp CLI. Step 3) Install Gulp in local project.
Read more >
Mea culpa - always install gulp-cli globally, not gulp
To best understanding why you should be installing gulp-cli globally and not gulp, you need to understand why there are two different packages....
Read more >
Quick Start | gulp.js
If you've previously installed gulp globally, run npm rm --global gulp before following these instructions. For more information, read this Sip.
Read more >
Installing Gulp
Check for Node and npm. In the terminal type node --version · Install the gulp command. In the terminal type npm install --global...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found