node.js - 运行Codebox时查找Node包的问题

标签 node.js ubuntu npm pty

按照说明在我们的服务器上安装 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/),但我仍然收到此错误。

有什么想法吗?

谢谢

最佳答案

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

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

此Codebox成功启动后。

关于node.js - 运行Codebox时查找Node包的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23570023/

相关文章:

javascript - 将时间戳与 Sequelize 查询中的日期进行比较

node.js - 查询 MongoDB 中的本地化数据

reactjs - 当我在 Ubuntu 中输入任何东西时,它会返回/usr/bin/env : ‘bash\r’ : No such file or directory

c - 试图在 c 中实现 ps 命令但出现奇怪的错误

node.js - 如何在互联网访问受限的环境中使用 npm

node.js - 永远使用 npm start 和环境变量

node.js - 你如何为 node.js 实现 AWS Elasticache 自动发现

php - 如何使用 node.js 实现 websocket 服务器?

windows - Windows 上 Ubuntu 上的 Firefox X11 无法运行

node.js - 在 NPM 之后安装 Yarn