【问题标题】:Issues in finding Node package when running Codebox运行 Codebox 时查找 Node 包的问题
【发布时间】:2014-06-27 12:18:45
【问题描述】:

按照说明在我们的服务器上安装 Node 和 Codebox 后,尝试启动 Codebox 时出现以下错误:

Use GIT actor for auth: xxx@yyy.com
[log][web] disable auth for /static
Error in the application:
Error: Cannot find module '../build/Release/pty.node'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object. (/usr/local/lib/node_modules/codebox/node_modules/shux/node_modules/pty.js/lib/pty.js:10:11)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
Error initializing CodeBox

我决定用 npm 安装 pty.js 来尝试解决这个问题,并确保它存在错误中输出的路径 (/usr/local/lib/node_modules/codebox/node_modules/shux/node_modules/pty. js/lib/) 但我仍然收到此错误。

有什么想法吗?

谢谢

【问题讨论】:

    标签: node.js ubuntu npm pty


    【解决方案1】:

    我认为这是 NMP 的错误,而不是 codebox 本身的错误,我遇到了类似的问题并尝试通过以下步骤修复它:

    1. 以这种方式安装节点:https://www.digitalocean.com/community/articles/how-to-install-an-upstream-version-of-node-js-on-ubuntu-12-04

    2. 然后尝试在不使用 sudo 的情况下安装 codebox,即使我不知道 sudo 有什么问题,但没有对我没用。

    希望它有效。

    【讨论】:

      【解决方案2】:

      这是我刚刚解决这个问题的方法:

      cd /usr/lib/node_modules/codebox/node_modules/shux/node_modules/pty.js
      make clean
      make
      

      在此 Codebox 成功启动后。

      【讨论】:

      • 这是为我做的!你知道是什么导致了这个问题吗?
      • @nickdbush 模块未编译。这就是我认为没有找到它的原因。
      猜你喜欢
      • 2020-05-06
      • 1970-01-01
      • 2021-09-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-23
      • 2016-11-13
      相关资源
      最近更新 更多