codeforequity-at / botium-bindings

The Selenium for Chatbots
http://www.botium.at
MIT License
108 stars 33 forks source link

npm errors when installing fbdirect sample's dependencies #77

Closed juananpe closed 6 years ago

juananpe commented 6 years ago

After installing and trying successfully Botium, I've pulled testmybot from git and started to play with fbdirect sample. But it seems that there are installation errors (working on macOS High Sierra, 10.13.4):

$ node -v
v9.4.0
$ npm -v
5.6.0

Issuing npm install inside /opt/testmybot works flawlessly (I'm assuming that this is the first step). However, if I try to install the samples/fbdirect dependencies (is this the second step?), I get this error:

cd /opt/testmybot/samples/fbdirect
npm install
....
npm ERR! path /opt/testmybot/node_modules/botium-core/node_modules/after
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/opt/testmybot/node_modules/botium-core/node_modules/after' -> '/opt/testmybot/node_modules/botium-core/node_modules/.after.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Any help will be greatly appreciated.

Attached log file : 2018-04-25T08_27_15_010Z-debug.log

codeforequity-at commented 6 years ago

Sometimes happens with npm. This can be usually solved by removing the "node_modules" folder and the "package-lock.json" file and running "npm install" again.

juananpe commented 6 years ago

Mmmh... tried that, with no luck. But I was able to address the problem following this npm thread. The hint that lead me to that SO discussion was getting a lot of WARN messages like these:

npm WARN deprecated nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-q3FgJdvhfFTT74HTLs4rLZn+JTg= integrity checksum failed when using sha1: wanted sha1-q3FgJdvhfFTT74HTLs4rLZn+JTg= but got sha512-KjZwU26uG3u6eZcfGbTULzFcsoz6pegNKtHPksZPOUsiKo5bUmiBPa38FuHZ/Eun+XYh/JCCkS9AS3Lu4McQOQ==. (2915 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.
WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha1-V8I1vIZX6RTSTho5fTyC2u4Ka6M= integrity checksum failed when using sha1: wanted sha1-V8I1vIZX6RTSTho5fTyC2u4Ka6M= but got sha512-jLBwwKUhi8WtBfsMQlL4bUUcT8sMkAtQinscJAe/M4KHCkHuUJAF6vuB0tueNIw4c8ziO6AkRmgY+jL3a0iiPw==. (3966 bytes)
WARN registry Using stale package data from https://registry.npmjs.org/ due to a request error during revalidation.

This incantation fixed my problem:

rm ./package-lock.json
rm -r ./node_modules
npm cache clear --force
codeforequity-at commented 6 years ago

Great, thanks for posting the solution!