When I run "npm run dev" my project works just fine but sometimes it suddenly stop working altogether. Restarting the server does nothing as the compiling of the client will be hanging silently without yielding any error.
However, when I run the node built-in debugger I get the following error:
no such file or directory, open '\node_modules\.cache\autodll-webpack-plugin\development_instance_0_4021edab164f5110f7f0f6b239caf46a\dll_902c0d8e342f4a2f6d51.js'
A quick investigation of the .cache folder gives the following structure:
.cache
- autodll-webpack-plugin
- development_instance_0_4021edab164f5110f7f0f6b239caf46a
|- stats.json
- development_instance_0_b224c84b1c3b29e9abccd88f69b9b5e2
|- dll_902c0d8e342f4a2f6d51.js
|- stats.json
|- dll.manifest.json
So basically what happens is that the needed file dll_902c0d8e342f4a2f6d51.js somehow ends up in the wrong directory. Deleting the 'empty' folder development_instance_0_4021edab164f5110f7f0f6b239caf46a solves the problem but said problem keeps on coming back (with different folder names).
I do not manage to reproduce it, it arise seemingly randomly when I am normally going on with the following workflow:
I have a feeling that it is related to webpack so here is my super basic next.config.js file:
const withSass = require('@zeit/next-sass');
module.exports = withSass({
sassLoaderOptions: {
outputStyle: 'compressed',
includePaths: [
'node_modules/material-components-web/node_modules/',
'node_modules/'
]
}
});
autodll-webpack-plugin was removed
Was a solution to this ever found? Having the same issue. On latest next.js 9.1.4.
npm install autodll-webpack-plugin --save seemed to work for me
Most helpful comment
npm install autodll-webpack-plugin --save seemed to work for me