【问题标题】:Error when Installing NPM module during Meteor.js's MUP Deploy在 Meteor.js 的 MUP 部署期间安装 NPM 模块时出错
【发布时间】:2014-09-27 18:35:21
【问题描述】:

我正在使用 Meteor-up mup v0.6.8 从 OSX 系统将 Meteor v0.9.3 应用程序部署到 Ubuntu 14.04 系统。它给出了一个错误,如下所示。

重复了npm i -g mupmup setupmup deploy,但都没有解决问题。

似乎重建 NPM 包时出现问题。有没有人遇到过这个问题?想知道是不是npm-container

$ mup deploy

Meteor Up: Production Quality Meteor Deployments
------------------------------------------------

Bundling Started: .

Started TaskList: Deploy app 'my-test-app' (linux)
[192.168.1.114] - Uploading bundle
[192.168.1.114] ✔ Uploading bundle: SUCCESS
[192.168.1.114] - Setting up Environment Variables
[192.168.1.114] ✔ Setting up Environment Variables: SUCCESS
[192.168.1.114] - Invoking deployment process
[192.168.1.114] ✘ Invoking deployment process: FAILED

    -----------------------------------STDERR-----------------------------------
    gyp info spawn args   '-Dmodule_root_dir=/opt/my-test-app/tmp/bundle/programs/server/npm/npm-container/node_modules/serialport',
    gyp info spawn args   '--depth=.',
    gyp info spawn args   '--no-parallel',
    gyp info spawn args   '--generator-output',
    gyp info spawn args   'build',
    gyp info spawn args   '-Goutput_dir=.' ]
    gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp
    gyp ERR! configure error 
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:343:16)
    gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
    gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
    gyp ERR! System Linux 3.12.28+
    gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild"
    gyp ERR! cwd /opt/my-test-app/tmp/bundle/programs/server/npm/npm-container/node_modules/serialport
    gyp ERR! node -v v0.10.32
    gyp ERR! node-gyp -v v1.0.2
    gyp ERR! not ok 
    -----------------------------------STDOUT-----------------------------------
    => re-installing binary npm module 'serialport' of package 'npm-container'
    ----------------------------------------------------------------------------
Completed TaskList: Deploy app 'my-test-app' (linux)

【问题讨论】:

    标签: javascript node.js meteor node-gyp meteor-up


    【解决方案1】:

    你试过了吗:

    sudo apt-get install build-essential
    

    我在 Ubuntu 14.04 上遇到了同样的问题,这立即解决了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-04-30
      • 2018-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-25
      • 2013-07-28
      • 2023-04-07
      相关资源
      最近更新 更多