ember-engines / ember-engines

Composable Ember applications for ambitious user experiences
http://ember-engines.com/
MIT License
490 stars 140 forks source link

Cannot read property 'paths' of undefined #753

Open chrisvdp opened 3 years ago

chrisvdp commented 3 years ago

While upgrading from ember-engines 0.8.8 -> 0.8.12 we experience the following issue in our CI test suite; Cannot read property 'paths' of undefined. It seems that https://github.com/ember-intl/ember-intl/blob/40aafd72b27344b109b9faba3097552b92f5d42f/index.js#L47 no longer finds the engine. Looking at the code it is checking that the keywords in package.json include ember-engine. The failing package does include

"keywords": [
    "ember-addon",
    "ember-engine"
  ],

in its package.json.

> CI=true COVERAGE=true $(npm bin)/ember test -c ../../testem.js --test-port 0
Cannot read property 'paths' of undefined
=================================================================================
ENV Summary:
  TIME: Thu Feb 18 2021 23:24:47 GMT+0000 (Coordinated Universal Time)
  TITLE: ember
  ARGV:
  - /usr/local/bin/node
  - /builds/swip/swip-frontend/packages/sca-engine/node_modules/.bin/ember
  - test
  - -c
  - ../../testem.js
  - --test-port
  - 0
  EXEC_PATH: /usr/local/bin/node
  TMPDIR: /tmp
  SHELL: /bin/bash
  PATH:
  - /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin
  - /builds/swip/swip-frontend/packages/sca-engine/node_modules/.bin
  - /usr/local/sbin
  - /usr/local/bin
  - /usr/sbin
  - /usr/bin
  - /sbin
  - /bin
  PLATFORM: linux x64
  FREEMEM: 14544359424
  TOTALMEM: 33734828032
  UPTIME: 577492
  LOADAVG: 18.00927734375,9.59521484375,9.26708984375
  CPUS:
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  - Intel(R) Xeon(R) CPU - 2800
  ENDIANNESS: LE
  VERSIONS:
  - ares: 1.16.0
  - brotli: 1.0.7
  - cldr: 37.0
  - http_parser: 2.9.3
  - icu: 67.1
  - llhttp: 2.1.2
  - modules: 72
  - napi: 6
  - nghttp2: 1.41.0
  - node: 12.18.4
  - openssl: 1.1.1g
  - tz: 2019c
  - unicode: 13.0
  - uv: 1.38.0
  - v8: 7.8.279.23-node.39
  - zlib: 1.2.11
ERROR Summary:
  - broccoliBuilderErrorStack: [undefined]
  - code: [undefined]
  - codeFrame: [undefined]
  - errorMessage: Cannot read property 'paths' of undefined
  - errorType: [undefined]
  - location:
    - column: [undefined]
    - file: [undefined]
    - line: [undefined]
  - message: Cannot read property 'paths' of undefined
  - name: TypeError
  - nodeAnnotation: [undefined]
  - nodeName: [undefined]
  - originalErrorMessage: [undefined]
  - stack: TypeError: Cannot read property 'paths' of undefined
    at Class.cacheKeyForTree (/builds/swip/swip-frontend/packages/internationalization-addon/node_modules/ember-intl/index.js:47:32)
    at Class.treeFor (/builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:619:36)
    at /builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:497:26
    at Array.reduce (<anonymous>)
    at Class.eachAddonInvoke (/builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:494:24)
    at Class.treeFor (/builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:627:22)
    at /builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:497:26
    at Array.reduce (<anonymous>)
    at Class.eachAddonInvoke (/builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-cli/lib/models/addon.js:494:24)
    at Class.treeFor (/builds/swip/swip-frontend/packages/sca-engine/node_modules/ember-engines/lib/engine-addon.js:1136:22)
=================================================================================
bertdeblock commented 3 years ago

Hi @chrisvdp we use ember-intl plus the latest version of ember-engines at work without any issues (that I'm aware of). Maybe a reproduction could help?

bertdeblock commented 3 years ago

@chrisvdp Is this still an issue? Would be nice to close this if otherwise.

chrisvdp commented 3 years ago

I've since left this job. Maybe @k-dauda.

k-dauda commented 3 years ago

Issue is no longer observed in v0.8.18