我是新的在节点编程,想请求帮助。我一直试图测试被动与appium本地应用和其他司机当我试着执行该脚本首先返回如下错误,文件是内部测试文件夹:
npm test
> demo_app@1.0.0 test
> ./node_modules/.bin/wdio wdio.conf.js"
'.' is not recognized as an internal or external command,
operable program or batch file.
C:demo_app>
,我路过一个教程,他们提到我需要将节点在该脚本命令之前
"scripts": {
"test": " ./node_modules/.bin/wdio wdio.conf.js""
},
我照做了,它变成了这个
"scripts": {
"test": "node ./node_modules/.bin/wdio wdio.conf.js""
},
错误现在变成这样:(文件在test/…)
npm test
> demo_app@1.0.0 test
> node ./node_modules/.bin/wdio wdio.conf.js"
C:demo_appnode_modules.binwdio:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at wrapSafe (internal/modules/cjs/loader.js:1001:16)
at Module._compile (internal/modules/cjs/loader.js:1049:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
at internal/main/run_main_module.js:17:47
如果有人能帮我的话
也许你对额外的特殊字符有问题?你能不能试试:
"scripts": {
"test": "node ./node_modules/.bin/wdio wdio.conf.js"
},