0

trying:

new BundleAnalyzerPlugin({
  analyzerMode: "static",
  openAnalyzer: false
})

fails with disk write permissions, (same on disabled mode, with static file). I'm using Ubuntu 18, is there a way to set the package, so that it will work for me and any other user? (regardless of Op sys?) if not, how to solve it?

return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: EACCES: permission denied, open '/report.html'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.writeFileSync (fs.js:1299:33)
    at /home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/viewer.js:160:8
    at tryHandleCache (/home/yaniv/Jeeng-Workspace/sdk/node_modules/ejs/lib/ejs.js:257:5)
    at Object.exports.renderFile (/home/yaniv/Jeeng-Workspace/sdk/node_modules/ejs/lib/ejs.js:482:10)
    at Object.generateReport (/home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/viewer.js:149:7)
    at BundleAnalyzerPlugin.generateStaticReport (/home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js:149:14)
    at /home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js:72:26
    at /home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js:80:22
    at Array.forEach (<anonymous>)
    at Immediate._onImmediate (/home/yaniv/Jeeng-Workspace/sdk/node_modules/webpack-bundle-analyzer/lib/BundleAnalyzerPlugin.js:79:21)
    at runCallback (timers.js:794:20)
    at tryOnImmediate (timers.js:752:5)
    at processImmediate [as _immediateCallback] (timers.js:729:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jeeng-sdk@1.0.0 start: `webpack-dev-server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jeeng-sdk@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/yaniv/.npm/_logs/2018-07-11T09_14_00_211Z-debug.log
Yaniv Peretz
  • 1,118
  • 2
  • 13
  • 22

1 Answers1

0

Had to change to relative path "./report.html" :) (so not to write on root ubuntu)

Yaniv Peretz
  • 1,118
  • 2
  • 13
  • 22