Error: Child compilation failed: Module build failed (from ./node_modules/html-webpack-plugin/lib/loader.js):
Whenever I run npm start my react app will compile but it will not display any content on the webpage.
Error:
Html Webpack Plugin:
Error: Child compilation failed:
Module build failed (from ./node_modules/html-webpack-plugin/lib/loader.js):
Error: ENOENT: no such file or directory, open '/mnt/c/Users/Eli22/OneDrive/Desktop/College/2018 - 2019 Senior/Spring 2019/CMSC389N/class/sandbox/test-react-app/p ublic/index.html':
Error: ENOENT: no such file or directory, open '/mnt/c/Users/Eli22/OneDrive/Desktop/College/2018 - 2019 Senior/Spring 2019/CMSC389N/class/sandbox/test-react-app/p ublic/index.html'
- compiler.js:141 childCompiler.runAsChild
[test-react-app]/[html-webpack-plugin]/lib/compiler.js:141:18
- Compiler.js:306 compile
[test-react-app]/[webpack]/lib/Compiler.js:306:11
- Compiler.js:630 hooks.afterCompile.callAsync.err
[test-react-app]/[webpack]/lib/Compiler.js:630:14
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[test-react-app]/[tapable]/lib/Hook.js:154:20
- Compiler.js:627 compilation.seal.err
[test-react-app]/[webpack]/lib/Compiler.js:627:30
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[test-react-app]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1325 hooks.optimizeAssets.callAsync.err
[test-react-app]/[webpack]/lib/Compilation.js:1325:35
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[test-react-app]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1316 hooks.optimizeChunkAssets.callAsync.err
[test-react-app]/[webpack]/lib/Compilation.js:1316:32
- Hook.js:154 AsyncSeriesHook.lazyCompileHook
[test-react-app]/[tapable]/lib/Hook.js:154:20
- Compilation.js:1311 hooks.additionalAssets.callAsync.err
[test-react-app]/[webpack]/lib/Compilation.js:1311:36
I noticed that there is a space in 'public' on the 3rd line (where it looks like 'p ublic') but I cannot find where this path is being created.
It must be a path configuration error.
I having troubles to find out how I could reproduce this bug.
Could you please try to create a minimal reproduction example (especially remove all dependencies, loaders and plugins which are not necessary for reproduction) and attach it (with out node_modules) as a zip to this issue?
How do you fixed this problem? I'm currently running into the same stuff and have no idea why I'm getting this error.
I fixed mine (same problem :))). To fix this error just read carefully folders name and path you write it. You will see that you miss some letters :P