我在我的NodeJS项目中安装了snyk@1.221
作为开发依赖项。我能够正常运行向导(yarn run snyk wizard
)。但是,test(yarn run snyk test
)命令将引发unknown error
。
我运行yarn run snyk test -d
进行调试,并显示以下内容:
Error: Cannot find module '../cli/commands/test'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
at Function.Module._load (internal/modules/cjs/loader.js:562:25)
at Module.require (internal/modules/cjs/loader.js:690:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.method (/home/ubuntu/proost/web/node_modules/snyk/src/lib/hotload.js:13:18)
at /home/ubuntu/proost/web/node_modules/snyk/src/cli/index.ts:27:29
at Generator.next (<anonymous>)
at /home/ubuntu/proost/web/node_modules/snyk/dist/cli/index.js:8:71
at new Promise (<anonymous>)
at __awaiter (/home/ubuntu/proost/web/node_modules/snyk/dist/cli/index.js:4:12)
这是我需要帮助的。这个丢失的文件是什么,我该如何添加?我什至尝试了全新安装的snyk,问题仍然存在!