Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.43k stars 435 forks source link

Error: Cannot find module './internal/applyEach' #609

Open scopsy opened 8 years ago

scopsy commented 8 years ago

When trying to install from NPM getting the next error :

phantomjs-prebuilt@2.1.12 install /home/app/node_modules/phantom/node_modules/phantomjs-prebuilt node install.js

|odule.js:327 throw err; ^

Error: Cannot find module './internal/applyEach' 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. (/home/app/node_modules/request/node_modules/form-data/node_modules/async/applyEach.js:7:18) 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 Module.require (module.js:353:17) at require (internal/module.js:12:17)

error appear on windows 10 & ubuntu 14.04

rafa-suagu commented 8 years ago

I have the same error, but only under RedHat. Under windows/mac works properly.

canmrt commented 8 years ago

My TeamCity build on a Linux server also fails because of this error. Any solutions/workarounds?

rafa-suagu commented 8 years ago

I updated the karma dependencies, remove the request npm package and all works fine.

My problem is that I had the request package fixed on a obsolete version and now the phantom has this dependence updated

I hope that help you

canmrt commented 8 years ago

Thanks a lot, I haven't tried it out yet. As a workaround, I set to use v2.1.10.

{ "phantomjs-prebuilt": "2.1.10" }