gulp command not found

后端 未结 8 1416
萌比男神i
萌比男神i 2020-12-07 02:19

Windows 10 pro x64

I ran the following commands

npm install --global gulp-cli
npm init

Then I changed directory to my project:

8条回答
  •  长情又很酷
    2020-12-07 02:58

    I solved the problem creating an alias in ~/.bashrc like this:

    alias gulp="node /home/deploy/app/node_modules/gulp/bin/gulp.js"
    

    Just put the alias in the end of the .bashrc file, then run:

    source ~/.bashrc
    

    Test with:

    gulp -v
    

    You should see something like this:

    [15:46:39] CLI version 3.9.1
    [15:46:39] Local version 3.9.1
    

提交回复
热议问题