Syl
Syl

Reputation: 3829

Compilation error when deploying my Ember/Rails app

I have a rails 5 ember 2.17 app that was previously being successfully deployed in production. The deployment is done with ember-cli-rails.

During asset compilation I have the following error :

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

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)

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

I am not sure what's the next step to solve this problem.

Upvotes: 0

Views: 251

Answers (1)

jelhan
jelhan

Reputation: 6338

I could see in the error log that the build used node 6:

ENV Summary:
  VERSIONS:
  - node: 6.14.3

Node 6 is not supported anymore. It's LTS supported ended at April 30, 2019. The ember ecosystem drops support for it as well.

Embroider is an experimental build tool for Ember. It's only tested against Node 10 so far.

I would recommend upgrading your build environment to a recent version of node.

Upvotes: 2

Related Questions