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
网友评论