Ran*_*ngh 3 javascript node.js npm gulp gulp-watch
我在我的应用程序中使用 gulp。
收到错误:- **> 开始
node_modules/.bin/gulp watch 'node_modules' 不被识别为内部或外部命令、可操作程序或批处理文件。**
在package.json中启动脚本:- "scripts": { "start": "node_modules/.bin/gulp watch" },
请帮助我解决这个问题。谢谢
小智 9
使用 npm 包时,不需要在 node_modules 中指定可执行文件的路径。尝试以下设置:
"scripts": {
"start": "gulp watch"
},
Run Code Online (Sandbox Code Playgroud)
确保 gulp 也存在于依赖项中。
"dependencies": {
"gulp": "^4.0.2"
}
Run Code Online (Sandbox Code Playgroud)