【问题标题】:Windows 7 Meteor UP (MUP) Error: spawn ENOENTWindows 7 Meteor UP (MUP) 错误:生成 ENOENT
【发布时间】:2014-07-03 20:16:17
【问题描述】:

我是新来的流星。我创建了一个使用 Meteor UP (MUP) 上传到服务器的应用程序。我有安装了 cPanel 的专用 linux 服务器。我可以通过 SSH 访问服务器。

我在尝试部署应用程序的本地设置中有 Windows 7。我创建了一个私钥并将它与 MUP 一起使用来部署应用程序。但是当我在命令提示符下运行mup setup 时,它给了我以下错误:

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


Started TaskList: Setup
[207.244.66.193] - Installing Node.js
[207.244.66.193] ? Installing Node.js: FAILED
        spawn ENOENT
Completed TaskList: Setup

这是我的 mup.json 文件

{
  // Server authentication info
  "servers": [
    {
      "host": "xxx.xxx.xx.xxx",
      "username": "devmain",
      //"password": "password"
      // or pem file (ssh based authentication)
      "pem": "/Users/Jackal/Desktop/mup1"
    }
  ],

  // Install MongoDB in the server, does not destroy local MongoDB on future setup
  "setupMongo": true,

  // WARNING: Node.js is required! Only skip if you already have Node.js installed on server.
  "setupNode": true,

  // WARNING: If nodeVersion omitted will setup 0.10.25 by default. Do not use v, only version number.
  "nodeVersion": "0.10.25",

  // Install PhantomJS in the server
  "setupPhantom": true,

  // Application name (No spaces)
  "appName": "myappname",

  // Location of app (local directory)
  "app": "/Users/Jackal/Desktop/app",

  // Configure environment
  "env": {
    "PORT": 3000,
    "ROOT_URL": "http://myapp.com"
  },

  // Meteor Up checks if the app comes online just after the deployment
  // before mup checks that, it will wait for no. of seconds configured below
  "deployCheckWaitTime": 15
}

谁能指出我在这里做错了什么?

【问题讨论】:

  • 您运行的是 debian 还是 ubuntu 系统?因为它需要 apt 包管理器存在。

标签: windows-7 ssh meteor meteor-up


【解决方案1】:

由于您正在运行 cPanel,很可能您没有运行基于 debian 的操作系统,因为它仅支持基于 redhat 的系统,因为 MeteorUP 依赖于apt 命令,并且仅在基于 debian 的系统上可用, MeteorUP 将不工作。

要在生产环境中运行您的应用,您可以使用 systemd:

[Service]
ExecStart=[path_to_your_meteor_cmd] [path_to_your_app]
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=[your_app_name]
User=[user_it_runs_under]
Group=[group_it_runs_under]
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

将其保存为[your_app_name].service 并在将每个[] 替换为正确的值后,将脚本放入/etc/systemd/system/,然后运行命令systemctl enable [appname].service 和systemctl start [appname].service,启用后将自动启动您的应用程序重启/崩溃。

这是我的参考:

[Service]
ExecStart=/usr/local/bin/meteor /home/meteor-run/spottr/
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=spottr
User=spottr
Group=spottr
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target

【讨论】:

  • 我检查了它正在运行redhat系统:(
  • 不能让你这样挂,所以我提供了一个替代方案,你可以用 systemd 自己做:-)
猜你喜欢
  • 2015-11-01
  • 2018-05-08
  • 2015-07-13
  • 2015-11-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-05-18
  • 1970-01-01
相关资源
最近更新 更多