美文网首页随笔-生活工作点滴
vue-cli 3.9.0新建项目运行时报错

vue-cli 3.9.0新建项目运行时报错

作者: 7abbcd54a89d | 来源:发表于2019-07-04 04:36 被阅读0次
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: Cannot find module 'E:\workSpace\test\node_modules\babel-loader\lib\index.js'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    ......

reason:

For anyone else diving into it, I think it's related to this change in eslint-loader that was meant to help support eslint 6. It's adding /package.json in situations where the userEslintPath seems to already be a file rather than a directory. This is resulting in eslint-loader trying to find the .../api.js/package.json path.

solution:

For npm users it should just be

npm i eslint-loader@2.1.2

相关文章

网友评论

    本文标题:vue-cli 3.9.0新建项目运行时报错

    本文链接:https://www.haomeiwen.com/subject/lcykhctx.html