Error on bench build

I am getting below when I do bench build

 yarn run v1.7.0
    warning ../../package.json: No license field
    $ FRAPPE_ENV=production node rollup/build.js
    Production mode
      return, stringToFlags(flags), mode);

    Error: ENOENT: no such file or directory, open '/home/frappe/frappe-bench/apps/frappe/node_modules/moment/min/moment-with-locales.min.js'
        at Error (native)
        at Object.fs.openSync (fs.js:640:18)
        at Object.fs.readFileSync (fs.js:508:33)
        at (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:84:39)
        at (native)
        at files_to_concat.forEach.output_file (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:78:36)
        at Array.forEach (native)
        at concatenate_files (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:75:18)
        at Object.<anonymous> (/home/frappe/frappe-bench/apps/frappe/rollup/build.js:24:1)
        at Module._compile (module.js:556:32)
        at Object.Module._extensions..js (module.js:565:10)
        at Module.load (module.js:473:32)
        at tryModuleLoad (module.js:432:12)
        at Function.Module._load (module.js:424:3)
        at Module.runMain (module.js:590:10)
        at run (bootstrap_node.js:394:7)
    error Command failed with exit code 1.
    info Visit for documentation about this command.

Install moment via npm and again try bench build

I tried npm install moment and yarn add moment but did not help
Btw I am on staging branch

My bad, this did the trick Error while installing frappe on my ubuntu 16.04 server! - #2 by codingCoffee

1 Like