gpt4 book ai didi

javascript - Windows 7 上的 Istanbul 尔 Jasmine Node 问题

转载 作者:行者123 更新时间:2023-12-03 06:05:27 25 4
gpt4 key购买 nike

尝试使用 jasmine-node 运行 Istanbul 尔

Running: node C:\myproject\project1\node_modules.bin\jasmine-node.CMD test No coverage information was collected, exit without writing coverage information C:\myproject\project1\merg\node_modules.bin\jasmine-node.CMD:1 (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0\node.exe" ( ^ SyntaxError: Invalid or unexpected token at Object.exports.runInThisContext (vm.js:76:16) at Module._compile (module.js:528:28) at Object.Module._extensions..js (module.js:565:10) at Object.Module._extensions.(anonymous function) [as .js] (C:\myproject\project1\merg\node_modules\istanbul\lib\hook.js:109:37) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3) at Function.Module.runMain (module.js:590:10) at runFn (C:\myproject\project1\merg\node_modules\istanbul\lib\command\common\run-with-cover.js:122:16) at C:\myproject\project1\merg\node_modules\istanbul\lib\command\common\run-with-cover.js:251:17

npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Users\itsme\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "run" "test-cov" npm ERR! node v6.6.0 npm ERR! npm v3.10.7 npm ERR! code ELIFECYCLE npm ERR! Merg@0.4.0 test-cov: istanbul cover --report
cobertura --include-all-sources jasmine-node test
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the Merg@0.4.0 test-cov script 'istanbul cover --report cobertura --include-all-sources jasmine-node test'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the Merg package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! istanbul cover --report cobertura --include-all-sources jasmine-node test npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs Merg npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls Merg npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:\myproject\project1\merg\npm-debug.log

最佳答案

尝试“node_modules/mocha/bin/_mocha”而不是“_mocha”

关于javascript - Windows 7 上的 Istanbul 尔 Jasmine Node 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39568617/

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