bench.utils.CommandFailedError: npm install

getting this error while installing frappe bench, how to resolve this?

Updating node libraries…
INFO:bench.utils:npm install
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > uws@9.14.0 install /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/uws
npm ERR! prepareGitDep > node-gyp rebuild > build_log.txt 2>&1 || exit 0
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > wd@1.11.1 install /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/wd
npm ERR! prepareGitDep > node scripts/build-browser-scripts
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > sauce-connect-launcher@1.2.4 postinstall /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/sauce-connect-launcher
npm ERR! prepareGitDep > node scripts/install.js || nodejs scripts/install.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev prepare /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb
npm ERR! prepareGitDep > npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev build /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb
npm ERR! prepareGitDep > webpack --config webpack.conf.js
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
npm ERR! prepareGitDep npm WARN deprecated istanbul@0.4.5: This module is no longer maintained, try this instead:
npm ERR! prepareGitDep npm WARN deprecated npm i nyc
npm ERR! prepareGitDep npm WARN deprecated Visit Tools That Integrate With Istanbul API's for other alternatives.
npm ERR! prepareGitDep npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! prepareGitDep npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See Status :: Nodemailer
npm ERR! prepareGitDep npm WARN deprecated babel-preset-es2015@6.24.1: :raised_hands: Thanks for using Babel: we recommend using babel-preset-env now: please read babel-preset-es2015 -> babel-preset-env · Babel to update!
npm ERR! prepareGitDep npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
npm ERR! prepareGitDep npm WARN deprecated uws@9.14.0: stop using this version
npm ERR! prepareGitDep npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an import issue introduced in 2.1.0
npm ERR! prepareGitDep npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm ERR! prepareGitDep npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm ERR! prepareGitDep npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version.
npm ERR! prepareGitDep /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/webpack-cli/bin/config-yargs.js:89
npm ERR! prepareGitDep describe: optionsSchema.definitions.output.properties.path.description,
npm ERR! prepareGitDep ^
npm ERR! prepareGitDep
npm ERR! prepareGitDep TypeError: Cannot read property ‘properties’ of undefined
npm ERR! prepareGitDep at module.exports (/home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/webpack-cli/bin/config-yargs.js:89:48)
npm ERR! prepareGitDep at /home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/webpack-cli/bin/webpack.js:60:27
npm ERR! prepareGitDep at Object. (/home/mujadidiainc/.npm/_cacache/tmp/git-clone-911555cb/node_modules/webpack-cli/bin/webpack.js:515:3)
npm ERR! prepareGitDep at Module._compile (internal/modules/cjs/loader.js:689:30)
npm ERR! prepareGitDep at Object.Module._extensions…js (internal/modules/cjs/loader.js:700:10)
npm ERR! prepareGitDep at Module.load (internal/modules/cjs/loader.js:599:32)
npm ERR! prepareGitDep at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
npm ERR! prepareGitDep at Function.Module._load (internal/modules/cjs/loader.js:530:3)
npm ERR! prepareGitDep at Module.require (internal/modules/cjs/loader.js:637:17)
npm ERR! prepareGitDep at require (internal/modules/cjs/helpers.js:22:18)
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev build: webpack --config webpack.conf.js
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev build script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! /home/mujadidiainc/.npm/_logs/2019-02-06T07_22_14_141Z-debug.log
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! parchment@2.0.0-dev prepare: npm run build
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the parchment@2.0.0-dev prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! /home/mujadidiainc/.npm/_logs/2019-02-06T07_22_14_375Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR! /home/mujadidiainc/.npm/_logs/2019-02-06T07_22_15_061Z-debug.log
Traceback (most recent call last):
File “/home/mujadidiainc/.local/bin/bench”, line 11, in
sys.exit(cli())
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/bench/cli.py”, line 40, in cli
bench_command()
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/bench/commands/make.py”, line 21, in init
verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/bench/utils.py”, line 72, in init
update_npm_packages(bench_path=path)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/mujadidiainc/.local/lib/python2.7/site-packages/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

hello, @Khadija have you solved this…
I have the same issue on my local setup

No I was not able to, then I installed easy install version.

Have you installed the npm?

Obviously

can you explain what are the steps you followed in installation and the screenshot of the issue you are facing right now?

Hii @arokia I also have the same problem. Do you have a solution.

  • sudo apt-get update

  • sudo apt-get install nodejs

  • sudo apt-get install npm

  • nodejs -v

  • cd ~

  • curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh

  • nano nodesource_setup.sh

  • sudo bash nodesource_setup.sh

  • sudo apt-get install nodejs

  • nodejs -v

  • npm -v

  • sudo apt-get install build-essential
    Kindly purge the existing npm and follow the above steps,
    Use this code for installing npm .

2 Likes

Ok I will give it a try and revert back to you.

Is the above steps helped you or not ?

Yes …Thanks Man.
I Completely removed node from the system.
Then manually installed frappe and it worked.
Thanks for the help.

you are welcome…!!!


@arokia Do You have any idea how to solve this problem. I am unable to see the Login Page.

Do you have any ip address for the container ?

@arokia I dont understand What IP Address?

ok type sudo ifconfig in frappe-bench it gives a output copy paste in browser…

Command Not Found

share your screenshot where you entered the command

In frappe bench folder only.

ok are you using the docker container…