运行'vue-test-utils-karma-example'get Error:无法解析'〜\ node_modules \ _vue-server-renderer @ 2.5.13 @ vue-server-renderer'中的'module'

时间:2018-03-22 13:20:07

标签: unit-testing vuejs2 karma-runner

vue-test-utils-karma-example

当我运行这个项目时

npm install
npm run test

记录如下:

  

警告   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   8330:15-8333:9关键依赖:依赖的请求是一个   表达@   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   @   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/index.js   @ ./node_modules/@vue/test-utils/dist/vue-test-utils.js @   ./test/Counter.spec.js

     

警告   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   8335:15-28关键依赖:依赖的请求是一个   表达@   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   @   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/index.js   @ ./node_modules/@vue/test-utils/dist/vue-test-utils.js @   ./test/Counter.spec.js

     

错误   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   找不到模块:错误:无法解析'模块'   'E:\ bhtif \ vue \ vue-test-utils-karma-example \ node_modules_vue-server-renderer @ 2.5.16 @ vue-server-renderer'@   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/build.js   8276:19-36 @   ./node_modules/_vue-server-renderer@2.5.16@vue-server-renderer/index.js   @ ./node_modules/@vue/test-utils/dist/vue-test-utils.js @   ./test/Counter.spec.js

     

webpack:无法编译。

我该如何解决这个问题?为什么?谢谢!

0 个答案:

没有答案