vue-cli 3.9.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 [email protected]

你可能感兴趣的:(vue-cli 3.9.0新建项目运行时报错)