I try install gulp in mac like this :
Is-iMac:~ itop$ npm root /Users/itop/node_modules Is-iMac:~ itop$ npm config set prefix /usr/local Is-iMac:~ itop$ npm root -g /usr/local/lib/node_modules Is-iMac:~ itop$ sudo npm install -g gulp
After Install I see this error In terminal:
npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. npm WARN deprecated [email protected]: lodash@<3.0.0 is no longer maintained. Upgrade to lodash@^4.0.0. npm WARN deprecated [email protected]: graceful-fs version 3 and before will fail on newer node releases. Please update to graceful-fs@^4.0.0 as soon as possible. npm ERR! Darwin 15.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "gulp" npm ERR! node v5.6.0 npm ERR! npm v3.8.0 npm ERR! path /usr/local/bin/gulp npm ERR! code EEXIST npm ERR! Refusing to delete /usr/local/bin/gulp: ../lib/node_modules/gulp-cli/bin/gulp.js symlink target is not controlled by npm /usr/local npm ERR! File exists: /usr/local/bin/gulp npm ERR! Move it away, and try again. npm ERR! Please include the following file with any support request: npm ERR! /Users/it/npm-debug.log
Now when i type gulp
for start/run in terminal i see this error:
-bash: gulp: command not found
EDIT: I try with this comment By archie-voyageur:
npm install --global gulp-cli
And See this error:
/usr/local/bin/gulp -> /usr/local/lib/node_modules/gulp-cli/bin/gulp.js npm ERR! Darwin 15.3.0 npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--global" "gulp-cli" npm ERR! node v5.6.0 npm ERR! npm v3.8.0 npm ERR! path /usr/local/share/man/man1/gulp.1 npm ERR! code EEXIST npm ERR! Refusing to delete /usr/local/share/man/man1/gulp.1: ../../../lib/node_modules/gulp/gulp.1 symlink target is not controlled by npm /usr/local npm ERR! File exists: /usr/local/share/man/man1/gulp.1 npm ERR! Move it away, and try again. npm ERR! Please include the following file with any support request: npm ERR! /Users/itop/npm-debug.log
How do fix this?
So 2 options: First run npm -g install gulp-cli then run gulp -v. Alternatively, you can just run npm list gulp.
To install Gulp locally, navigate to your project directory and run npm install gulp . You can save it to your package. json dependencies by running npm install gulp --save-dev . Once you have Gulp installed locally, you can then proceed to create your gulpfile.
To solve the error "'gulp' is not recognized as an internal or external command, operable program or batch file", install the gulp-cli package globally by running npm install -g gulp-cli , restart your terminal and make sure your PATH environment variable is set up correctly.
Just came across this issue myself and managed to solve it with:
$ npm uninstall --global gulp gulp-cli $ rm /usr/local/share/man/man1/gulp.1 $ npm install --global gulp-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With