I am trying to set up the needed environment for a project I am gonna work on. I am not able to run gulp
command as expected (as it is told on the getting started page of Gulp).
I am using Linux (PopOS) which is based on Ubuntu and Debian.
So, I have tried to fix it in the local project repo – which was unsuccessful.
Then I decided to create a new project directory and see whether it works. I have done these in the new project file:
$ node -v v8.10.0 $ npm -v 5.6.0 $ npx -v 9.7.1 $ npm install --global gulp-cli $ npm install --save-dev gulp
After all these, at the last step, when I do:
$ gulp -bash: /usr/bin/gulp: No such file or directory
this is what I get.
However, if I do this,
$ node_modules/gulp/bin/gulp.js --version CLI version: 2.2.0 Local version: 4.0.2
I get some result.
Does anybody see why gulp
isn’t getting in my binary directory? – Even though I have done the same exact steps that are presented on the official website?
Advertisement
Answer
This issue was about npm prefix that defines the directory where npm packages will be installed. Because the gulp binary wasn’t in one of the directories that is in PATH
variable bash wasn’t able to find it. Here you can find details about how to fix.