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

Cannot find module 'rollup'


#1

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
module.js:487
    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 https://yarnpkg.com/en/docs/cli/run 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!!


#2

try npm install rollup


#3

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!

/home/frappe/frappe-bench/node_modules/rollup-plugin-vue/dist/rollup-plugin-vue.js:118
        ...createVuePartRequest.defaultLang,
        ^^^

SyntaxError: Unexpected token ...

image


#4

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