Home

Issue: 2259

ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '...'

[issue link]

With the latest dev branch I cannot start nuxt. I guess it’s related with my specific setup… we have nuxt installed in a subfolder called “pwa”. Therefore we instereted “srcDir” optoin in nuxt.config.js:
srcDir: 'pwa/'

If i try to run or build it with the latest dev branch though, it results in errors like:
ERROR in Entry module not found: Error: Can't resolve 'babel-loader' in '...'

To solve it, I added to the nutx.config.js function “extend(config, { isDev, isClient, isServer }) {”

 // fix node_modules directory
 config.resolve.modules = config.resolveLoader.modules = [path.resolve(__dirname, "node_modules")];

then it works.
Just in case someone needs this… actually I think it is a bug, as this was not needed before (and is not really documented either).

Thanks
Simon

This question is available on Nuxt.js community (#c1980)