weixin_39940901
weixin_39940901
2020-12-08 19:17

Install script assumes node binary is on PATH

This is problematic when you have multiple node/npm installations, and the one you want is not on the PATH, e.g. when you're using the Jenkins NodeJS plugin, which installs node/npm & packages "globally" but doesn't put anything on the PATH. The idea here is that you can install multiple versions and specify them on a per-job basis. It would be nice if Phantom's install script invoked the binary initially used for npm install.

I realize this might be a pain, given all of the install.js jiggery-pokery going on. I have to say, I'm left wondering...

该提问来源于开源项目:Medium/phantomjs

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

4条回答

  • weixin_39520988 weixin_39520988 5月前

    It seems like you might have better traction explaining your use-case to npm and asking them to make sure that the right node is on PATH during the install life-cycle? I'm not sure there's anything we can do about this without buy-in from npm

    点赞 评论 复制链接分享
  • weixin_39958025 weixin_39958025 5月前

    I'm having the same issue also on Jenkins. Other npm installations are executing correctly.

    点赞 评论 复制链接分享
  • weixin_39520988 weixin_39520988 5月前

    https://github.com/Medium/phantomjs#im-on-debian-or-ubuntu-and-the-installer-failed-because-it-couldnt-find-node

    点赞 评论 复制链接分享
  • weixin_39520988 weixin_39520988 5月前

    I'm going to close this bug because we don't plan to take any action. It seems reasonable to assume that node is on PATH, and no one has proposed a plausible alternative.

    点赞 评论 复制链接分享

相关推荐