django-webpack / webpack-bundle-tracker

Spits out some stats about webpack compilation process to a file
MIT License
268 stars 107 forks source link

Can't switch from NPM to yarn or the other way around #84

Closed augnustin closed 3 years ago

augnustin commented 3 years ago

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)

Can't this behavior be avoided?