我安装了npm,显示版本为9.2.0。当我运行npm run test
命令时,我得到错误'.' is not recognized as an internal or external command
。我还检查了是否也设置了环境变量。我不知道为什么会发生这种情况。
下面是我的package.json文件:
{
"name": "udemy_cucumber",
"version": "1.0.0",
"description": "practice bdd suite",
"main": "index.js",
"scripts": {
"test": "./node_modules/.bin/cucumber-js --require cucumber.js --require step-definitions/**/*.js -f json:cucumber_report.json --publish-quiet"
},
"author": "",
"license": "ISC",
"dependencies": {
"@cucumber/cucumber": "^8.11.1",
"@playwright/test": "^1.30.0",
"chai": "^4.3.7",
"cucumber-html-reporter": "^5.5.0",
"i": "^0.3.7",
"prettier": "^2.8.4"
}
}
我的文件夹结构如下:
有人能帮我找出我错过了什么吗?
1条答案
按热度按时间oug3syen1#
我自己发现的。显然,windows终端接受反斜杠来识别文件夹路径。
命令将为: