gpt4 book ai didi

javascript - 'node_modules' 不是内部或外部命令、可运行程序或批处理文件

转载 作者:行者123 更新时间:2023-12-05 00:52:40 24 4
gpt4 key购买 nike

我在我的应用程序中使用 gulp。

  1. 已安装 gulp
  2. 输入 npm 脚本
  3. 使用“npm start”运行脚本

得到错误:-**> 开始

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

在 package.json 中启动脚本:-“脚本”:{“开始”:“node_modules/.bin/gulp watch”},

请帮我解决这个问题。谢谢

最佳答案

使用 npm 包时,您无需在 node_modules 中指定可执行文件的路径。尝试以下设置:

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

确保 gulp 也存在于依赖项中。

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

关于javascript - 'node_modules' 不是内部或外部命令、可运行程序或批处理文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69535845/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com