javascript - no command 'gulp' found - after installation -
after installing gulp.js via npm receive no command 'gulp' found
error when running gulp
command same directory installed into.
when looking under node_modules/.bin/
directory can see gulp
executable there.
is there wrong npm installation?
that's normal. if want gulp-cli
available on command line, need install globally.
npm install --global gulp-cli
also, node_modules/.bin/
isn't in $path
. automatically added npm when running npm scripts (see this blog post reference).
so add scripts
package.json
file:
{ "name": "your-app", "version": "0.0.1", "scripts": { "gulp": "gulp", "minify": "gulp minify" } }
you run npm run gulp
or npm run minify
launch gulp tasks.
Comments
Post a Comment