Webpack 5 upgrade and module not found error

18 views Asked by At

I am getting below error after updating webpack5 with respect to React module compilation.

With webpack 4 we were able to refer few node modules outside of sr/ folder using path.resolve and path.join. But now thats not working.

Module not found: Error: You attempted to import file s which falls outside of the project src/ directory. Relative imports outside of src/ are not supported. You can either move it inside src/, or add a symlink to it from project's node_modules/.

0

There are 0 answers