admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Error: Cannot find module 'mkdirp' on `npm install wd` #463

Closed cbrock closed 7 years ago

cbrock commented 7 years ago

Noticed this error occurring in CI shortly after the 1.1.2 release, but I can reproduce in an empty project in which wd is the only dependency.

The full error is:

❯ npm install --save wd
npm WARN package.json y@1.0.0 No repository field.
npm WARN package.json y@1.0.0 No README data
-
> wd@1.1.2 install /Users/cbrock/dev/foo/node_modules/wd
> node scripts/build-browser-scripts

module.js:327
    throw err;
    ^

Error: Cannot find module 'mkdirp'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/Users/colinbrock/dev/foo/node_modules/wd/scripts/build-browser-scripts.js:2:14)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
npm ERR! Darwin 15.6.0
npm ERR! argv "/opt/nodes/4.7.2/bin/node" "/opt/boxen/nodenv/versions/4.7.2/bin/npm" "install" "--save" "wd"
npm ERR! node v4.7.2
npm ERR! npm  v2.15.11
npm ERR! code ELIFECYCLE

npm ERR! wd@1.1.2 install: `node scripts/build-browser-scripts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the wd@1.1.2 install script 'node scripts/build-browser-scripts'.
npm ERR! This is most likely a problem with the wd package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/build-browser-scripts
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs wd
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls wd
npm ERR! There is likely additional logging output above.

My local environment:

❯ node -v
v4.7.2

❯ npm -v
2.15.11

Please let me know if I can provide any additional info.

danielmconrad commented 7 years ago

I'm getting the same failures.

node: v4.4.6
npm: 2.15.5
imurchie commented 7 years ago

mkdirp is a dev dependency in package.json but needs to be a regular one.

imurchie commented 7 years ago

Should be fixed for builds now. Sorry about that.