embroider-build/addon-blueprint

Creating addon fails on undefined property

prsethre opened this issue · 2 comments

When trying to create a v2 addon, the script fails (regardless of any flags provided or omitted, including --typescript) with the following error:

Cannot read properties of undefined (reading 'typescript')

Full stacktrace and error report:

`=================================================================================

ENV Summary:

TIME: Thu Feb 09 2023 16:31:06 GMT-0600 (Central Standard Time)
TITLE: ember
ARGV:

  • /Users/user/.nvm/versions/node/v16.18.0/bin/node
  • /Users/user/.nvm/versions/node/v18.7.0/bin/ember
  • addon
  • vault-common
  • -b
  • @embroider/addon-blueprint
  • --yarn
  • --skip-git
  • --skip-npm
  • --test-app-name=vault-common-test-app
  • --test-app-location=addons/vault-common/test-app
  • --addon-location=addons/vault-common/package
  • --typescript
    EXEC_PATH: /Users/user/.nvm/versions/node/v16.18.0/bin/node
    TMPDIR: /var/folders/tk/b6pwmbm56bqf_fhqgx_45_hh0000gp/T
    SHELL: /bin/zsh
    PATH:
  • /Users/user/.nvm/versions/node/v16.18.0/bin
  • /Users/user/.nvm/versions/node/v18.7.0/bin
  • /usr/local/opt/go@1.17/bin
  • /opt/homebrew/bin
  • /opt/homebrew/sbin
  • /usr/local/bin
  • /System/Cryptexes/App/usr/bin
  • /usr/bin
  • /bin
  • /usr/sbin
  • /sbin
  • /usr/local/go/bin
  • /Users/user/.nvm/versions/node/v18.7.0/bin
  • /usr/local/opt/go@1.17/bin
  • /opt/homebrew/bin
  • /opt/homebrew/sbin
    PLATFORM: darwin arm64
    FREEMEM: 3779903488
    TOTALMEM: 34359738368
    UPTIME: 87986
    LOADAVG: 7.1728515625,8.90380859375,9.37451171875
    CPUS:
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
  • Apple M1 Max - 24
    ENDIANNESS: LE
    VERSIONS:
  • ares: 1.18.1
  • brotli: 1.0.9
  • cldr: 41.0
  • icu: 71.1
  • llhttp: 6.0.10
  • modules: 93
  • napi: 8
  • nghttp2: 1.47.0
  • nghttp3: 0.7.0
  • ngtcp2: 0.8.1
  • node: 16.18.0
  • openssl: 1.1.1q+quic
  • tz: 2022b
  • unicode: 14.0
  • uv: 1.43.0
  • v8: 9.4.146.26-node.22
  • zlib: 1.2.11

ERROR Summary:

  • broccoliBuilderErrorStack: [undefined]
  • code: [undefined]
  • codeFrame: [undefined]
  • errorMessage: Cannot read properties of undefined (reading 'typescript')
  • errorType: [undefined]
  • location:
    • column: [undefined]
    • file: [undefined]
    • line: [undefined]
  • message: Cannot read properties of undefined (reading 'typescript')
  • name: TypeError
  • nodeAnnotation: [undefined]
  • nodeName: [undefined]
  • originalErrorMessage: [undefined]
  • stack: TypeError: Cannot read properties of undefined (reading 'typescript')
    at Class.files (/private/var/folders/tk/b6pwmbm56bqf_fhqgx_45_hh0000gp/T/ember-cli202319-32893-z6kpe5.bycl/node_modules/@embroider/addon-blueprint/index.js:268:17)
    at Class.superWrapper [as files] (/Users/user/projects/cloud-ui/node_modules/core-object/lib/assign-properties.js:34:20)
    at Class.install (/Users/user/projects/cloud-ui/node_modules/ember-cli/lib/models/blueprint.js:449:43)
    at Class.install (/private/var/folders/tk/b6pwmbm56bqf_fhqgx_45_hh0000gp/T/ember-cli202319-32893-z6kpe5.bycl/node_modules/@embroider/addon-blueprint/index.js:45:32)
    at Class.superWrapper [as install] (/Users/user/projects/cloud-ui/node_modules/core-object/lib/assign-properties.js:34:20)
    at InstallBlueprintTask.run (/Users/user/projects/cloud-ui/node_modules/ember-cli/lib/tasks/install-blueprint.js:49:21)
    at async Class.run (/Users/user/projects/cloud-ui/node_modules/ember-cli/lib/commands/init.js:93:5)
    at async Class.run (/Users/user/projects/cloud-ui/node_modules/ember-cli/lib/commands/new.js:93:22)
    at async /Users/user/projects/cloud-ui/node_modules/ember-cli/lib/cli/cli.js:204:32
    at async CLI.run (/Users/user/projects/cloud-ui/node_modules/ember-cli/lib/cli/cli.js:251:14)

=================================================================================
`

That's unexpected.

@prsethre can you please post the version of Ember CLI you are using? And if it's an older one, then please test with the latest stable release (should be 4.10?)

It works on Ember CLI v4.10