Why can I not look at the details of Gulp files ?

I have just set up WebStorm.  I created a new project from the Google Web Sample and I would like to look at the gulpfile.js

First I went and installed the Gulp globally using: npm install -g gulp

Next I installed it locally using: npm install gulp

Then I click on the gulpfile.js and it brings up the Gulp window. However after clicking the refresh button, restarting I could not see the list of tasks in the gulp window. Instead an error message came up saying:

Failed to list tasks details

The first time it came up it said a package "del" was missing so I installed that.  Then it said another package was missing so it installed that. Now it is saying this package is missing:

Failed to list gulp tasks in Google Web Starter Kit\gulpfile.js: external process finished with error exit code 8

"C:\Program Files (x86)\JetBrains\WebStorm 9.0.1\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" C:\Users\Richard\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js --no-color --gulpfile "c:\Users\Richard\WebstormProjects\Google Web Starter Kit\gulpfile.js" --tasks

Error: Cannot find module 'browser-sync'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (c:\Users\Richard\WebstormProjects\Google Web Starter Kit\gulpfile.js:27:19)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Process finished with exit code 8

Is there something wrong with the way I am installing ?

3 comments
Comment actions Permalink

Are you using https://github.com/google/web-starter-kit? You need installing all local dependencies by executing 'npm install' in the directory where package.json is located to avoid errors like this

0
Comment actions Permalink

I did "File > New Project" and then selected a project type of "Web Starter Kit"

I already did :  npm install gulp

Now that I just created a new project before doing anything else then should I go to the top directory of my project and go to the terminal and type:

npm install

Should I do something to install gulp locall after that?

Thanks

0
Comment actions Permalink

You have installed gulp only, but other dependencies are still missing.
npm install will install ALL local dependencies listed in package.json, including gulp.
Please open your newly created "Web Starter Kit" project, open the built-in terminal (Alt+F12) and type npm install there.
Once all dependencies are installed (will take some time), you will be able to run your gulpfile

0

Please sign in to leave a comment.