gpt4 book ai didi

node.js - 错误 : Cannot find module 'tap'

转载 作者:行者123 更新时间:2023-11-28 20:10:47 25 4
gpt4 key购买 nike

得到这个错误;

> weather-app@1.0.0 test C:\Users\Ofirs\Desktop\n-4-11-chaining
> mocha **/*.test.js

module.js:540
throw err;
^

Error: Cannot find module 'tap'
at Function.Module._resolveFilename (module.js:538:15)

当尝试通过“npm run test-watch”运行 mocha 时,这里是我的 package.json 文件:

{
"name": "weather-app",
"version": "1.0.0",
"description": "",
"main": "test.js",
"scripts": {
"test": "mocha **/*.test.js",
"test-watch": "nodemon --exec \"npm test\""
},
"author": "",
"license": "ISC",
"dependencies": {
"request": "^2.83.0",
"yargs": "^4.8.1"
},
"devDependencies": {
"chai": "^4.1.2",
"mocha": "^4.1.0",
"supertest": "^3.0.0"
}
}

请帮我找出问题所在。和平

最佳答案

无需帮助,问题已解决。我刚刚在“mocha”之后添加了另一个“*”。

关于node.js - 错误 : Cannot find module 'tap' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48308684/

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