首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >部署Ember/Rails应用程序时出现编译错误

部署Ember/Rails应用程序时出现编译错误
EN

Stack Overflow用户
提问于 2019-07-08 21:49:23
回答 1查看 213关注 0票数 0

我有一个rails 5 ember 2.17应用程序,之前已经成功部署到生产环境中。部署是使用ember-cli-rails完成的。

在资产编译过程中,我有以下错误:

代码语言:javascript
复制
=================================================================================

ENV Summary:

  TIME: Mon Jul 08 2019 15:40:33 GMT+0200 (CEST)
  TITLE: ember
  ARGV:
  - /usr/bin/node
  - /srv/production/www/placedemarche/releases/20190708133545/marketadmin/node_modules/ember-cli/bin/ember
  - build
  - --environment
  - production
  - --output-path
  - /srv/production/www/placedemarche/releases/20190708133545/tmp/ember-cli/apps/marketadmin
  EXEC_PATH: /usr/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /srv/production/www/placedemarche/shared/bundle/ruby/2.4.0/bin
  - /home/admin/.rvm/gems/ruby-2.4.1/bin
  - /home/admin/.rvm/gems/ruby-2.4.1@global/bin
  - /home/admin/.rvm/rubies/ruby-2.4.1/bin
  - /home/admin/.rvm/bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  - /usr/games
  - /usr/local/games
  PLATFORM: linux x64
  FREEMEM: 1093439488
  TOTALMEM: 3149369344
  UPTIME: 16758723
  LOADAVG: 0.8134765625,0.71240234375,0.56201171875
  CPUS:
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  - Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz - 2200
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.10.1-DEV
  - http_parser: 2.8.0
  - icu: 58.2
  - modules: 48
  - napi: 3
  - node: 6.14.3
  - openssl: 1.0.2o
  - uv: 1.16.1
  - v8: 5.1.281.111
  - zlib: 1.2.11

ERROR Summary:

  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Unexpected identifier
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: Unexpected identifier
  - name: SyntaxError
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: /srv/production/www/placedemarche/releases/20190708133545/marketadmin/node_modules/@embroider/core/src/to-broccoli-plugin.js:18
        async build() {
              ^^^^^

SyntaxError: Unexpected identifier
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/srv/production/www/placedemarche/releases/20190708133545/marketadmin/node_modules/@embroider/core/src/index.js:9:28)

=================================================================================

我不确定解决这个问题的下一步是什么。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-08 23:05:48

我可以在错误日志中看到构建使用了节点6:

代码语言:javascript
复制
ENV Summary:
  VERSIONS:
  - node: 6.14.3

不再支持节点6。LTS支持截止于2019年4月30日。ember生态系统也放弃了对它的支持。

Embroider是Ember的实验性构建工具。到目前为止,它只在Node 10上进行了测试。

我建议您将构建环境升级到最新版本的node。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56936380

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档