gpt4 book ai didi

node.js - 使用 npm install 安装依赖项后运行命令

转载 作者:搜寻专家 更新时间:2023-10-31 22:22:46 24 4
gpt4 key购买 nike

我有一个这样的 package.json 文件

{
"name": "E2E",
"version": "1.0.0",
"description": "AngularJS E2E testing",
"main": "conf.js",
"scripts": {
"postinstall": "node_modules/protractor/bin/webdriver-manager update",
"test": "echo \"Error: no test specified\" && exit 1"
},
"license": "ISC",
"devDependencies": {
"protractor": "^2.2.0"
}
}

在安装 Protractor 后运行命令 npm install 时抛出错误

node_modules/protractor/bin/webdriver-manager update
'node_modules' is not recognized as an internal or external command, operable program or batch file

最佳答案

好的,找到了修复,我需要像这样将它作为 Node 命令运行

"postinstall": "node node_modules/protractor/bin/webdriver-manager update",

关于node.js - 使用 npm install 安装依赖项后运行命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32585078/

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