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

Bench install error - CommandFailedError: npm install


#1

Hi all…

I am installing ERPNext … I got the below error… plz help me to fix this issue…

npm http 200 https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz

    > chromedriver@2.34.0 install /home/erpnext/frappe-bench/node_modules/chromedriver
    > node install.js


    /home/erpnext/frappe-bench/node_modules/chromedriver/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
    const Hoek = require('hoek');
    ^^^^^
    SyntaxError: Use of const in strict mode.
        at Module._compile (module.js:439:25)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
        at Function.Module._load (module.js:312:12)
        at Module.require (module.js:364:17)
        at require (module.js:380:17)
        at Object.<anonymous> (/home/erpnext/frappe-bench/node_modules/chromedriver/node_modules/request/node_modules/hawk/lib/index.js:5:33)
        at Module._compile (module.js:456:26)
        at Object.Module._extensions..js (module.js:474:10)
        at Module.load (module.js:356:32)
    npm ERR! weird error 8
    npm ERR! Error: ENOENT, lstat '/home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js'
    npm ERR! If you need help, you may report this log at:
    npm ERR!     <http://github.com/isaacs/npm/issues>
    npm ERR! or email it to:
    npm ERR!     <npm-@googlegroups.com>

    npm ERR! System Linux 3.10.0-123.el7.x86_64
    npm ERR! command "node" "/usr/bin/npm" "install"
    npm ERR! cwd /home/erpnext/frappe-bench
    npm ERR! node -v v0.10.46
    npm ERR! npm -v 1.3.6
    npm ERR! path /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js
    npm ERR! fstream_path /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
    npm ERR! tar pack Error reading /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889591828-0.5794681173283607/package
    npm ERR! addLocalDirectory Could not pack "/home/erpnext/tmp/npm-3023-PZiTEEOx/1514889591828-0.5794681173283607/package" to "/home/erpnext/.npm/uws/0.14.5/package.tgz"
    npm WARN optional dep failed, continuing uws@~0.14.4
    npm http GET https://registry.npmjs.org/mime-types
    npm http GET https://registry.npmjs.org/negotiator/0.6.1
    npm http GET https://registry.npmjs.org/base64-arraybuffer/0.1.5
    npm http 304 https://registry.npmjs.org/mime-types
    npm http 304 https://registry.npmjs.org/negotiator/0.6.1
    npm http 304 https://registry.npmjs.org/base64-arraybuffer/0.1.5
    npm http GET https://registry.npmjs.org/mime-db
    npm ERR! tar pack Error reading /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889596260-0.5054863248951733/package
    npm ERR! addLocalDirectory Could not pack "/home/erpnext/tmp/npm-3023-PZiTEEOx/1514889596260-0.5054863248951733/package" to "/home/erpnext/.npm/electron-releases/2.1.0/package.tgz"
    npm http 304 https://registry.npmjs.org/mime-db
    npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-modules-amd/node_modules/babel-runtime/node_modules/core-js/modules'
    npm ERR! error rolling back  babel-preset-env@1.6.1 { [Error: ENOTEMPTY, rmdir '/home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-modules-amd/node_modules/babel-runtime/node_modules/core-js/modules']
    npm ERR! error rolling back   errno: 53,
    npm ERR! error rolling back   code: 'ENOTEMPTY',
    npm ERR! error rolling back   path: '/home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-modules-amd/node_modules/babel-runtime/node_modules/core-js/modules' }
    npm ERR! Error: ENOENT, lstat '/home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-async-to-generator/node_modules/babel-helper-remap-async-to-generator/node_modules/babel-template/node_modules/lodash/_createAggregator.js'
    npm ERR! If you need help, you may report this log at:
    npm ERR!     <http://github.com/isaacs/npm/issues>
    npm ERR! or email it to:
    npm ERR!     <npm-@googlegroups.com>

    npm ERR! System Linux 3.10.0-123.el7.x86_64
    npm ERR! command "node" "/usr/bin/npm" "install"
    npm ERR! cwd /home/erpnext/frappe-bench
    npm ERR! node -v v0.10.46
    npm ERR! npm -v 1.3.6
    npm ERR! path /home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-async-to-generator/node_modules/babel-helper-remap-async-to-generator/node_modules/babel-template/node_modules/lodash/_createAggregator.js
    npm ERR! fstream_path /home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-async-to-generator/node_modules/babel-helper-remap-async-to-generator/node_modules/babel-template/node_modules/lodash/_createAggregator.js
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
    npm ERR! Error: ENOENT, lstat '/home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-classes/node_modules/babel-template/node_modules/lodash/README.md'
    npm ERR! If you need help, you may report this log at:
    npm ERR!     <http://github.com/isaacs/npm/issues>
    npm ERR! or email it to:
    npm ERR!     <npm-@googlegroups.com>

    npm ERR! System Linux 3.10.0-123.el7.x86_64
    npm ERR! command "node" "/usr/bin/npm" "install"
    npm ERR! cwd /home/erpnext/frappe-bench
    npm ERR! node -v v0.10.46
    npm ERR! npm -v 1.3.6
    npm ERR! path /home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-classes/node_modules/babel-template/node_modules/lodash/README.md
    npm ERR! fstream_path /home/erpnext/frappe-bench/node_modules/babel-preset-env/node_modules/babel-plugin-transform-es2015-classes/node_modules/babel-template/node_modules/lodash/README.md
    npm ERR! fstream_type File
    npm ERR! fstream_class FileWriter
    npm ERR! code ENOENT
    npm ERR! errno 34
    npm ERR! fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
    npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
    npm ERR! 
    npm ERR! Additional logging details can be found in:
    npm ERR!     /home/erpnext/frappe-bench/npm-debug.log
    npm ERR! not ok code 0
    Traceback (most recent call last):
      File "/usr/bin/bench", line 9, in <module>
        load_entry_point('bench==4.1.0', 'console_scripts', 'bench')()
      File "/home/erpnext/bench-repo/bench/cli.py", line 40, in cli
        bench_command()
      File "/usr/lib/python2.7/site-packages/click/core.py", line 716, in __call__
        return self.main(*args, **kwargs)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 696, in main
        rv = self.invoke(ctx)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 1060, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/usr/lib/python2.7/site-packages/click/core.py", line 889, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/usr/lib/python2.7/site-packages/click/core.py", line 534, in invoke
        return callback(*args, **kwargs)
      File "/home/erpnext/bench-repo/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/erpnext/bench-repo/bench/utils.py", line 72, in init
        update_npm_packages(bench_path=path)
      File "/home/erpnext/bench-repo/bench/utils.py", line 442, in update_npm_packages
        exec_cmd('npm install', cwd=bench_path)
      File "/home/erpnext/bench-repo/bench/utils.py", line 140, in exec_cmd
        raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: npm install

#2

Can you check the error log file above for details of the error?


#3

@Pawan Thank you for the quick response…

The log conatins

76433 silly gunzTarPerm extractEntry fp/padStart.js
76434 silly gunzTarPerm extractEntry fp/invokeArgsMap.js
76435 error Error: ENOENT, lstat '/home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js'
76436 error If you need help, you may report this log at:
76436 error     <http://github.com/isaacs/npm/issues>
76436 error or email it to:
76436 error     <npm-@googlegroups.com>
76437 error System Linux 3.10.0-123.el7.x86_64
76438 error command "node" "/usr/bin/npm" "install"
76439 error cwd /home/erpnext/frappe-bench
76440 error node -v v0.10.46
76441 error npm -v 1.3.6
76442 error path /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js
76443 error fstream_path /home/erpnext/tmp/npm-3023-PZiTEEOx/1514889606015-0.17138044210150838/package/xregexp-all.js
76444 error fstream_type File
76445 error fstream_class FileWriter
76446 error code ENOENT
76447 error errno 34
76448 error fstream_stack /usr/lib/node_modules/fstream/lib/writer.js:284:26
76448 error fstream_stack Object.oncomplete (fs.js:108:15)
76449 verbose exit [ 34, true ]

#4

Hi

can anybody help me to resolve this issue?


#5

does this chromedriver issue help?


#6

If this is CentOS install check that SELinux is disabled?

edit: for EL7 set SELinux to permissive
see here *SOLVED* Install.py now FAILS on Unbuntu 14.04, Debian 8, Centos 7. What happened? (also same on Ubuntu 16.04) *SOLVED*


#7


Follow the steps.