Error: Cannot find module PhantomJS

node install.js

 

Considering PhantomJS found at /usr/local/bin/phantomjs

Looks like an `npm install -g`

Error checking path, continuing { Error: Cannot find module '/usr/local/lib/node_modules/phantomjs/lib/location'

    at Function.Module._resolveFilename (module.js:438:15)

    at Function.Module._load (module.js:386:25)

    at Module.require (module.js:466:17)

    at require (internal/module.js:20:19)

    at getLocationInLibModuleIfMatching (/Users/zhangjin/MyWork/FrontWorkspace/react-flux/react-webpack-redux/node_modules/phantomjs-prebuilt/install.js:332:19)

    at Promise._successFn (/Users/zhangjin/MyWork/FrontWorkspace/react-flux/react-webpack-redux/node_modules/phantomjs-prebuilt/install.js:389:28)

    at nextTickCallback (/Users/zhangjin/MyWork/FrontWorkspace/react-flux/react-webpack-redux/node_modules/kew/kew.js:47:28)

    at _combinedTickCallback (internal/process/next_tick.js:67:7)

    at process._tickCallback (internal/process/next_tick.js:98:9) code: 'MODULE_NOT_FOUND' }

Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1//phantomjs-2.1.1-macosx.zip

Saving to /tmp/phantomjs/phantomjs-2.1.1-macosx.zip

Receiving...

 

Error making request.

Error: read ECONNRESET

    at exports._errnoException (util.js:896:11)

    at TLSWrap.onread (net.js:556:26)

 

Please report this full log at https://github.com/Medium/phantomjs

npm ERR! Darwin 15.0.0

npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"

npm ERR! node v6.0.0

npm ERR! npm  v3.9.1

npm ERR! code ELIFECYCLE

 

npm ERR! phantomjs-prebuilt@2.1.7 install: `node install.js`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the phantomjs-prebuilt@2.1.7 install script 'node install.js'.

npm ERR! Make sure you have the latest version of node.js and npm installed.

npm ERR! If you do, this is most likely a problem with the phantomjs-prebuilt package,

npm ERR! not with npm itself.

npm ERR! Tell the author that this fails on your system:

npm ERR!     node install.js

npm ERR! You can get information on how to open an issue for this project with:

npm ERR!     npm bugs phantomjs-prebuilt

npm ERR! Or if that isn't available, you can get their info via:

npm ERR!     npm owner ls phantomjs-prebuilt

npm ERR! There is likely additional logging output above.

 

npm ERR! Please include the following file with any support request:

npm ERR!     /Users/zhangjin/MyWork/FrontWorkspace/react-flux/react-webpack-redux/npm-debug.log

 

 

当我使用 yeoman 安装 

yo react-webpack-redux 时 报这个找不到 PhantomJS 的错误 

npm install -g phantomjs也解决不了 

我是Mac环境 之后 我npm remove -g phantomjs

然后 用 Mac的brew安装phantomjs    

brew install phantomjs 安装成功后 

就解决了问题 

 

  

 

 

转载于:https://www.cnblogs.com/QuestionsZhang/p/5510737.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值