ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Cannot find module 'rollup'


On my production instance, when i do bench update. it gives following error

frappe@erpnext-production:~/frappe-bench$ bench build
yarn run v1.16.0
$ FRAPPE_ENV=production node rollup/build.js
    throw err;

Error: Cannot find module 'rollup'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:4:16)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)
    at Function.Module._load (module.js:458:3)
error Command failed with exit code 1.
info Visit for documentation about this command.

Note: I tried to follow all the suggestions present on discuss ex. [post1] (Error: Cannot find module ‘rollup’) but this solutions doesn’t work in my case.

My version:
Ubuntu 16.04.6 LTS
erpnext 11.1.30
frappe 11.1.28

Any help or clue is appreciated!!


try npm install rollup


Thanks! @saurabh6790 for your valuable input. I did make some progress. With every bench build it kept on throwing what was missing. So I ran following commands from bench folder

sudo npm install rollup
sudo npm install rollup-plugin-buble
sudo npm install rollup-plugin-uglify
sudo npm install rollup-plugin-vue

and finally bench build now gives below error!


SyntaxError: Unexpected token ...



It is javascript error @netchampfaris any pointers are welcome! thanks