Got an error while creating new bench

i typed command
bench init frappe-bench && cd frappe-bench
after retrieving object i got this error

npm ERR! package.json npm can’t find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/avinash/.npm/_logs/2019-02-26T06_00_12_311Z-debug.log
Traceback (most recent call last):
File “/home/avinash/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/avinash/.local/lib/python2.7/site-packages/bench/cli.py”, line 40, in cli
bench_command()
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/avinash/.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/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 72, in init
update_npm_packages(bench_path=path)
File “/home/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

Can you share the screen/traceback? and maybe a few lines from the npm error log

this was the command i typed and screen i got----------------------

INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:./env/bin/pip -q install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.utils:./env/bin/pip -q install wheel
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.utils:./env/bin/pip -q install six
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript --origin upstream
Cloning into ‘frappe’…
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 165950 (delta 0), reused 1 (delta 0), pack-reused 165942
Receiving objects: 100% (165950/165950), 192.76 MiB | 121.00 KiB/s, done.
Resolving deltas: 100% (126437/126437), done.
(‘installing’, u’frappe’)
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q -e frappe-bench/apps/frappe --no-cache-dir
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won’t be maintained after that date. A future version of pip will drop support for Python 2.7.

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 WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch@1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated hoek@0.9.1: The major version is no longer supported. Please update to 4.x or newer
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > uws@9.14.0 install /home/avinash/.npm/_cacache/tmp/git-clone-87dae44c/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/avinash/.npm/_cacache/tmp/git-clone-87dae44c/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/avinash/.npm/_cacache/tmp/git-clone-87dae44c/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/avinash/.npm/_cacache/tmp/git-clone-87dae44c
npm ERR! prepareGitDep > npm run build
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > parchment@2.0.0-dev build /home/avinash/.npm/_cacache/tmp/git-clone-87dae44c
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 nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
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 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 mailcomposer@4.0.1: This project is unmaintained
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 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 uws@9.14.0: New code is available at GitHub - uNetworking/uWebSockets.js: μWebSockets for Node.js back-ends
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 hoek@2.16.3: 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 /home/avinash/.npm/_cacache/tmp/git-clone-87dae44c/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/avinash/.npm/_cacache/tmp/git-clone-87dae44c/node_modules/webpack-cli/bin/config-yargs.js:89:48)
npm ERR! prepareGitDep at /home/avinash/.npm/_cacache/tmp/git-clone-87dae44c/node_modules/webpack-cli/bin/webpack.js:60:27
npm ERR! prepareGitDep at Object. (/home/avinash/.npm/_cacache/tmp/git-clone-87dae44c/node_modules/webpack-cli/bin/webpack.js:515:3)
npm ERR! prepareGitDep at Module._compile (module.js:653:30)
npm ERR! prepareGitDep at Object.Module._extensions…js (module.js:664:10)
npm ERR! prepareGitDep at Module.load (module.js:566:32)
npm ERR! prepareGitDep at tryModuleLoad (module.js:506:12)
npm ERR! prepareGitDep at Function.Module._load (module.js:498:3)
npm ERR! prepareGitDep at Module.require (module.js:597:17)
npm ERR! prepareGitDep at require (internal/module.js:11: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/avinash/.npm/_logs/2019-02-26T06_00_11_605Z-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/avinash/.npm/_logs/2019-02-26T06_00_11_900Z-debug.log
npm ERR! prepareGitDep
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: parchment@github:quilljs/parchment#487850f7eb030a6c4e750ba809e58b09444e0bdb.
npm ERR! package.json npm can’t find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR! /home/avinash/.npm/_logs/2019-02-26T06_00_12_311Z-debug.log
Traceback (most recent call last):
File “/home/avinash/.local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/avinash/.local/lib/python2.7/site-packages/bench/cli.py”, line 40, in cli
bench_command()
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 764, in call
return self.main(*args, **kwargs)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 717, in main
rv = self.invoke(ctx)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/avinash/.local/lib/python2.7/site-packages/click/core.py”, line 555, in invoke
return callback(*args, **kwargs)
File “/home/avinash/.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/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 72, in init
update_npm_packages(bench_path=path)
File “/home/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 442, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/avinash/.local/lib/python2.7/site-packages/bench/utils.py”, line 140, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

Kindly follow this link

2 Likes