日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

ubuntu系统下面PhantomJS not found on PATH

發布時間:2023/12/31 windows 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu系统下面PhantomJS not found on PATH 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

完整報錯如下:
PhantomJS not found on PATH
Downloading https://github.com/Medium/phantomjs/releases/download/v2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ^C
(python3.6) root@iZuf62cvmxv23irc7lrcobZ:~/saleor_docker/saleor-storefront# cnpm install phantomjs@02.1.1
? Installed 1 packages
? Linked 11 latest versions
[1/1] scripts.install phantomjs@02.1.1 run "node install.js", root: "/root/saleor_docker/saleor-storefront/node_modules/_phantomjs@2.1.1@phantomjs"
PhantomJS not found on PATH
Phantom installation failed TypeError: Path must be a string. Received undefined
? ? at assertPath (path.js:28:11)
? ? at Object.join (path.js:1236:7)
? ? at findSuitableTempDirectory (/root/saleor_docker/saleor-storefront/node_modules/_phantomjs@2.1.1@phantomjs/install.js:126:30)
? ? at /root/saleor_docker/saleor-storefront/node_modules/_phantomjs@2.1.1@phantomjs/install.js:441:19
? ? at nextTickCallback (/root/saleor_docker/saleor-storefront/node_modules/_kew@0.7.0@kew/kew.js:47:28)
? ? at _combinedTickCallback (internal/process/next_tick.js:131:7)
? ? at process._tickCallback (internal/process/next_tick.js:180:9) TypeError: Path must be a string. Received undefined
? ? at assertPath (path.js:28:11)
? ? at Object.join (path.js:1236:7)
? ? at findSuitableTempDirectory (/root/saleor_docker/saleor-storefront/node_modules/_phantomjs@2.1.1@phantomjs/install.js:126:30)
? ? at /root/saleor_docker/saleor-storefront/node_modules/_phantomjs@2.1.1@phantomjs/install.js:441:19
? ? at nextTickCallback (/root/saleor_docker/saleor-storefront/node_modules/_kew@0.7.0@kew/kew.js:47:28)
? ? at _combinedTickCallback (internal/process/next_tick.js:131:7)
? ? at process._tickCallback (internal/process/next_tick.js:180:9)
[npminstall:runscript:error] phantomjs@02.1.1 scripts.install run "node install.js" error: RunScriptError: Run "sh -c node install.js" error, exit code 1
? Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "sh -c node install.js" error, exit code 1
RunScriptError: post install error, please remove node_modules before retry!
Run "sh -c node install.js" error, exit code 1
? ? at ChildProcess.proc.on.code (/usr/local/lib/node_modules/cnpm/node_modules/runscript/index.js:96:21)
? ? at emitTwo (events.js:126:13)
? ? at ChildProcess.emit (events.js:214:7)
? ? at maybeClose (internal/child_process.js:925:16)
? ? at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)

?

有的人覺得這么簡單的問題你都不會還要寫博客記錄一下?

實際情況是,即使指定路徑下面有這個文件(只適用于Centos和Windows,不適用于Ubuntu),你安裝docker的時候還會讓你重新下載,懵逼不懵逼?

/tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2

最終解決方案:

cnpm install phantomjs-prebuilt@2.1.14 --ignore-scripts

如果是saleor-dashboard,上述方案有效,

如果是saleor-storefront, 上述方案無效。

另外,誠懇的建議:

沒啥必要,不要去碰package.json里面對phantomjs有依賴的實驗。

?

?

總結

以上是生活随笔為你收集整理的ubuntu系统下面PhantomJS not found on PATH的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。