Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Local gulp not found (Try running: npm install gulp)

I created a module (webapp-module-storage) which has the following definitions:

package.json

{   "dependencies": {     ...   },   "devDependencies": {     "gulp": "^3.9.1",     ...   },   "name": "webapp-module-storage",   "scripts": {     "postinstall": "gulp build",     "test": "gulp test"   } } 

I thought I can use my module inside another module when installing it with:

  • npm install github:myorg/webapp-module-storage#master

However, when I install my module, I am getting this error:

Local gulp not found

Try running: npm install gulp

Screenshot

enter image description here

My understanding is, that gulp is shipped together with my module because I declared it in devDependencies but it looks like that my npm postinstall script cannot find gulp.

Am I missing something?

like image 205
Benny Neugebauer Avatar asked Jun 29 '16 15:06

Benny Neugebauer


2 Answers

Try running npm link gulp in your application directory (to create a local link to the globally installed Gulp module).

like image 104
Fab Fuerste Avatar answered Sep 19 '22 03:09

Fab Fuerste


Try installing your dependencies first:

npm install 

If still does not work, install gulp globally:

npm install -g gulp 

if you find problems installing it. type sudo before npm.

In case you need more info about why you need gulp globally and locally read this answer

like image 31
Sebastian Salamanca Avatar answered Sep 19 '22 03:09

Sebastian Salamanca