【问题标题】:nodejitsu deploy: scons command not foundnodejitsu部署:未找到scons命令
【发布时间】:2015-04-08 16:15:42
【问题描述】:

我正在尝试使用 nodejitsu 部署我的节点应用程序,但在运行“jitsu deploy”时收到错误消息。

相关的错误行是:

> libxmljs@0.4.1 preinstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make node

make: scons: Command not found
make: *** [node] Error 127
npm http 200 https://registry.nodejitsu.com/css-stringify
npm http 200 https://registry.nodejitsu.com/css-parse
npm http 200 https://registry.nodejitsu.com/is-promise/-/is-promise-1.0.1.tgz

> libxmljs@0.4.1 preuninstall /root/tmp/tmp-31613c7bs0y8/build/package/node_modules/twilio/node_modules/libxmljs
> make clean

make: scons: Command not found
make: *** [clean] Error 127
npm http GET https://registry.nodejitsu.com/css-stringify/-/css-stringify-1.0.5.tgz
npm http GET https://registry.nodejitsu.com/css-parse/-/css-parse-1.0.4.tgz
npm WARN continuing anyway libxmljs@0.4.1 preuninstall: `make clean`
npm WARN continuing anyway Exit status 2
npm ERR! libxmljs@0.4.1 preinstall: `make node`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the libxmljs@0.4.1 preinstall script.
npm ERR! This is most likely a problem with the libxmljs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     make node
npm ERR! You can get their info via:
npm ERR!     npm owner ls libxmljs
npm ERR! There is likely additional logging output above.

npm ERR! System SunOS 5.11
npm ERR! command "node" "/opt/local/bin/npm" "install" "--loglevel=http"
npm ERR! cwd /root/tmp/tmp-31613c7bs0y8/build/package
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.14
npm ERR! code ELIFECYCLE

所以我按照此处所述安装了 scons:http://www.scons.org/doc/2.3.1/HTML/scons-user.html#idm14220792

基本安装tar文件,打开,运行“sudo python setup.py install”

现在当我运行 'scons -v' 时,它会返回:

SCons by Steven Knight et al.:
    script: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
    engine: v2.3.4, 2014/09/27 12:51:43, by garyo on lubuntu
    engine path: ['/usr/local/lib/scons-2.3.4/SCons']
Copyright (c) 2001 - 2014 The SCons Foundation

但是当我再次运行“jitsu deploy”时,我看到了同样的错误。 scons 还没有正确安装吗?这是 nodejitsu、scons 或 libxmljs 的问题吗?

【问题讨论】:

  • SCons 似乎已经安装在“/usr/local/lib”...所以你有没有用“which scons”检查过 SCons 脚本的位置,并确保它的文件夹(可能是什么像“/usr/local/bin”)在用于构建/部署的 make 环境的 PATH 中?
  • 谢谢 dirkbaechle,我想大概就是这样。 “which scons”确实显示/usr/local/bin/scons,但我不确定如何检查用于部署的make环境的PATH,有什么想法吗?
  • 不,抱歉...我不熟悉您正在使用的这个构建/部署环境。我只能说,这在我看来不像是 SCons 特有的问题。
  • 是的,我相信这是 libxmljs 的问题。我也尝试使用 Heroku 进行部署,它也产生了与 libxmljs 中的“make node”和“make clean”相同的错误。我可能会提出一个单独的问题,因为该问题似乎并不特定于 nodejitsu 或 scons,而只是关于 libxmljs 的 make 环境。无论如何感谢您的帮助!

标签: python node.js scons nodejitsu libxml-js


【解决方案1】:

您使用的是非常旧的 libxmljs (v0.4.1 is from 2010) 版本,该版本旨在与更旧版本的节点(例如 v0.6.x 和更早版本)一起使用。在撰写本文时,libxmljs 的最新稳定版本是 v0.13.0,因此您应该尝试更新模块。

【讨论】:

  • 我升级了我的 libxmljs 版本,现在正在运行 'npm list -g | grep libxmljs' 产生'libxmljs@0.13.0',但我仍然看到与 scons 相同的错误。
  • 不要全局安装。只需在项目的根目录中执行npm install libxmljs
  • 我也将它安装在项目的根目录中,但我看到了同样的错误。我相信 dirkbaechle 对我的问题的评论是正确的,即 scons 可能不在用于部署的 make 环境的 PATH 中,但我不确定如何在必要时检查或添加它。
猜你喜欢
  • 2015-04-12
  • 2019-11-05
  • 1970-01-01
  • 1970-01-01
  • 2015-01-01
  • 2016-01-08
  • 1970-01-01
  • 2012-09-10
  • 2021-07-14
相关资源
最近更新 更多