Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
91
rated 0 times [  95] [ 4]  / answers: 1 / hits: 6993  / 3 Years ago, tue, october 12, 2021, 12:00:00

I am using gulp in my application.



  1. installed gulp

  2. put the npm script

  3. run the script by using "npm start"


Got the error:-
**> start



node_modules/.bin/gulp watch
'node_modules' is not recognized as an internal or external command,
operable program or batch file.**



In package.json to start the script:-
"scripts": {
"start": "node_modules/.bin/gulp watch"
},


Kindly help me to fix this issue.
Thank you


More From » node.js

 Answers
6

When working with npm packages you do not need to specify a path to executable in node_modules. Try the following setup:


  "scripts": {
"start": "gulp watch"
},

Make sure that gulp is present in dependencies as well.


  "dependencies": {
"gulp": "^4.0.2"
}

[#779] Friday, October 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kaitlynnb

Total Points: 402
Total Questions: 96
Total Answers: 109

Location: Trinidad and Tobago
Member since Fri, May 8, 2020
4 Years ago
kaitlynnb questions
Thu, Sep 16, 21, 00:00, 3 Years ago
Tue, Jun 23, 20, 00:00, 4 Years ago
Mon, May 20, 19, 00:00, 5 Years ago
Fri, Mar 22, 19, 00:00, 5 Years ago
;