1. After pulling the project from git, there is a gulpfile.js file, bower.json file, and package.son file
2. I first executed bower install and then executed it again. nam install gulp --save-dev`
3. Now the corresponding bower_comments file and node_moudles file are generated, and node_moudles contains gulp and corresponding dependencies
4. However, when executing gulp serve or directly executing gulp, it prompts "command not found" , is this my installation process wrong? What went wrong?
The gulp installed like this is local to the project. Entering gulp directly requires global installation
npm i gulp -g
or
./node_modules/gulp/bin/gulp.js
npm install -g gulp try
The local installation of your project--save-dev only allows require('gulp') in gulpfile.js to reference things, and executing the gulp command on the command line depends on the configuration of path in your environment variable. Path There should be a path pointing to the C:UsersxxxAppDataRoamingnpm directory. There is a gulp.cmd script in this directory. You will understand after opening it.