[solved] update error from chromedriver added to node_modules

For the record on update to master this error arose:

chromedriver@2.30.1 install /home/frappe/frappe-bench/node_modules/chromedriver
node install.js

Downloading https://chromedriver.storage.googleapis.com/2.30/chromedriver_linux32.zip
Saving to /home/frappe/tmp/chromedriver/chromedriver_linux32.zip
Received 796K…
Received 1582K…
Received 2366K…
Received 3150K…
Received 3799K total.
Extracting zip contents
ChromeDriver installation failed [TypeError: Object # has no method ‘isAbsolute’]
npm WARN This failure might be due to the use of legacy binary “node”
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! weird error 1
npm ERR! not ok code 0
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 62, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
File “/home/frappe/bench-repo/bench/commands/update.py”, line 83, in _update
update_npm_packages(bench_path=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 432, in update_npm_packages
exec_cmd(‘npm install’, cwd=bench_path)
File “/home/frappe/bench-repo/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install

This notes chromedriver was added to node_modules on June 19 (before v8.1 release)

frappe@erpnext:~/frappe-bench$ find . -name *.json | xargs grep chromedriver
./package.json: “chromedriver”: “^2.30.1”,
./apps/frappe/package.json: “chromedriver”: “^2.30.1”,

The update completed without errors after a nodejs (7.10?) reinstall as noted here

1 Like