我在Windows上使用Ubuntu。我克隆了一個新的react-redux-starter-kit。 react-redux-universal-hot-example和我自己的實現有相同的問題。Webpack熱重載ENOENT沒有這樣的文件或目錄
後npm install
我啓動了服務器與npm start
和頁面工作完美。
只要我編輯一個文件,我得到以下錯誤:
Unhandled rejection Error: Module build failed: Error: ENOENT: no such file or directory, open '/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/src/main.js'
at Error (native)
at Compiler.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/build/webpack.config.js:69:15)
at Compiler.applyPlugins (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:26:37)
at Watching._done (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:78:17)
at Watching.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:51:17)
at /mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:403:12
at Compiler.next (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:67:11)
at Compiler.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/CachePlugin.js:40:4)
at Compiler.applyPluginsAsync (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:71:13)
at Compiler.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compiler.js:400:9)
at Compilation.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compilation.js:577:13)
at Compilation.applyPluginsAsync (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:60:69)
at Compilation.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compilation.js:572:10)
at Compilation.applyPluginsAsync (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:60:69)
at Compilation.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compilation.js:567:9)
at Compilation.applyPluginsAsync (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/tapable/lib/Tapable.js:60:69)
at Compilation.<anonymous> (/mnt/c/Users/xxx/WebstormProjects/react-redux-starter-kit/node_modules/webpack/lib/Compilation.js:563:8)
我編輯的文件是未找到(main.js),但該文件存在文件。我相信還有其他人也有同樣的問題。有沒有人有修復?
我使用的是最新的Ubuntu最新的Windows Insider Build 14965,但問題也出現在以前的版本中。
你找到一個解決辦法? – Richard
找到解決辦法。見下。 – Piu130