It appears that if there already is a webpack-stats.json file built by yarn start, then running npm start returns the following error:
Error: EACCES: permission denied, open 'webpack-stats.json'
at Object.openSync (node:fs:495:3)
at Object.writeFileSync (node:fs:1519:35)
at Plugin.writeOutput (/app/node_modules/webpack-bundle-tracker/lib/index.js:124:6)
at compile (/app/node_modules/webpack-bundle-tracker/lib/index.js:58:10)
at SyncHook.eval [as call] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:7:1)
at SyncHook.lazyCompileHook (/app/node_modules/tapable/lib/Hook.js:154:20)
at /app/node_modules/webpack/lib/Compiler.js:665:23
at AsyncSeriesHook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:6:1)
at AsyncSeriesHook.lazyCompileHook (/app/node_modules/tapable/lib/Hook.js:154:20)
at Compiler.compile (/app/node_modules/webpack/lib/Compiler.js:662:28)
at /app/node_modules/webpack/lib/Watching.js:77:18
at AsyncSeriesHook.eval [as callAsync] (eval at create (/app/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:24:1)
at AsyncSeriesHook.lazyCompileHook (/app/node_modules/tapable/lib/Hook.js:154:20)
at Watching._go (/app/node_modules/webpack/lib/Watching.js:41:32)
at /app/node_modules/webpack/lib/Watching.js:33:9
at Compiler.readRecords (/app/node_modules/webpack/lib/Compiler.js:529:11)
It appears that if there already is a
webpack-stats.json
file built byyarn start
, then runningnpm start
returns the following error:Can't this behavior be avoided?