File not found error while recompiling
fbrckman opened this issue · 1 comments
I am able to start the application using npm run client
. However, after making any change in the code (e.g. removing a newline), the following error is thrown while recompiling:
ℹ 「wdm」: Compiling...
fs.js:646
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open 'path_to_schimatos/dist/e6359d3bb586980af860.hot-update.json'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.getOwnPropertyNames.forEach.asset (path_to_schimatos/source/node_modules/webpack-war-plugin/dist/WebpackWarPlugin.js:30:37)
at Array.forEach (<anonymous>)
at compiler.plugin (path_to_schimatos/source/node_modules/webpack-war-plugin/dist/WebpackWarPlugin.js:28:60)
at AsyncSeriesHook.eval [as callAsync] (eval at create (path_to_schimatos/source/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:7:1)
at asyncLib.forEachLimit.err (path_to_schimatos/source/node_modules/webpack/lib/Compiler.js:482:27)
at path_to_schimatos/source/node_modules/neo-async/async.js:2818:7
at done (path_to_schimatos/source/node_modules/neo-async/async.js:3522:9)
at AsyncSeriesHook.eval [as callAsync] (eval at create (path_to_schimatos/source/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
It seems quite unexpected to need a file from dist/
while trying to recompile the code, especially since compilation works in the first place.
Firstly - apologies that this repo is a bit of a mess ATM. I'm aiming to fix that and push some significant updates/fixes in the near future (late this year/early next year) once we have completed some more immediate work for our use case partners.
The npm run client
and npm run server
commands are legacy and I have just pushed an update that removes those commands. This is because we were originally doing some of the processing/rendering server side. The npm run build
command is what you are after, try running that and let me know if you are still having issues :)
FYI I think the reason we look dist folder is because we produce a .war
file (in addition to .bundle.js
) so that we can deploy Schimatos using Apache Tomcat. That file includes static content such as images so we need to retrieve images from the dist folder. If you aren't interested in producing the .war
file you can remove the call to that plugin from webpack.config.js
and it will reduce your compile time.