部署我的 Ember/Rails 应用程序时出现编译错误
Compilation error when deploying my Ember/Rails app
我有一个 rails 5 ember 2.17 应用程序,之前已成功部署到生产环境中。使用 ember-cli-rails.
完成部署
在资产编译过程中出现以下错误:
=================================================================================
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)
=================================================================================
我不确定解决这个问题的下一步是什么。
我可以在错误日志中看到构建使用了节点 6:
ENV Summary:
VERSIONS:
- node: 6.14.3
不再支持节点 6。它的 LTS 支持已于 2019 年 4 月 30 日结束。ember 生态系统也不再支持它。
Embroider 是 Ember 的实验性构建工具。到目前为止,它仅针对 Node 10 进行了测试。
我建议将您的构建环境升级到最新版本的节点。
我有一个 rails 5 ember 2.17 应用程序,之前已成功部署到生产环境中。使用 ember-cli-rails.
完成部署在资产编译过程中出现以下错误:
=================================================================================
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)
=================================================================================
我不确定解决这个问题的下一步是什么。
我可以在错误日志中看到构建使用了节点 6:
ENV Summary:
VERSIONS:
- node: 6.14.3
不再支持节点 6。它的 LTS 支持已于 2019 年 4 月 30 日结束。ember 生态系统也不再支持它。
Embroider 是 Ember 的实验性构建工具。到目前为止,它仅针对 Node 10 进行了测试。
我建议将您的构建环境升级到最新版本的节点。