Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running ember-cli-update on generated v2 addon fails #93

Open
simonihmig opened this issue Jan 12, 2023 · 3 comments
Open

Running ember-cli-update on generated v2 addon fails #93

simonihmig opened this issue Jan 12, 2023 · 3 comments

Comments

@simonihmig
Copy link
Collaborator

Tried to update a v2 adodn created with the 1.3 version of this blueprint to the latest 1.4, using npx ember-cli-update. Which gave this error output:

Error creating new application. Removing generated directory `./ember-headless-form`
Cannot read properties of undefined (reading 'typescript')


Stack Trace and Error Report: /var/folders/w9/2p5cmdpn6sd1sbql4ynytzyr0000gn/T/error.dump.71fc2fa1a0a0e9ff14d25a835ccb7ce5.log
Error creating new application. Removing generated directory `./ember-headless-form`
Cannot read properties of undefined (reading 'typescript')


Stack Trace and Error Report: /var/folders/w9/2p5cmdpn6sd1sbql4ynytzyr0000gn/T/error.dump.f6618369a5f40caed8117658e0580f52.log
WARNING: Node v18.12.1 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
The option '--pnpm' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--ci-provider' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--typescript' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
WARNING: Node v18.12.1 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
The option '--pnpm' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--ci-provider' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--typescript' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
Error creating new application. Removing generated directory `./my-project`
Cannot read properties of undefined (reading 'typescript')


Stack Trace and Error Report: /var/folders/w9/2p5cmdpn6sd1sbql4ynytzyr0000gn/T/error.dump.4e3a1124bcb28256909920b53823657d.log
Error creating new application. Removing generated directory `./my-project`
Cannot read properties of undefined (reading 'typescript')


Stack Trace and Error Report: /var/folders/w9/2p5cmdpn6sd1sbql4ynytzyr0000gn/T/error.dump.a162f6e1bfdf06487bd6d1507d2c0912.log
Error: Command failed with exit code 1: npx ember-cli@3.16 new my-project -sg -sn -sb -b @embroider/addon-blueprint@1.3.0 --pnpm --ci-provider=github --typescript
WARNING: Node v18.12.1 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.
The option '--pnpm' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--ci-provider' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
The option '--typescript' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.
Error creating new application. Removing generated directory `./my-project`
    at makeError (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/execa/lib/error.js:60:11)
    at handlePromise (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/execa/index.js:118:26)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async __runEmber (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/ember-cli-update/src/get-start-and-end-commands.js:214:11)
    at async _runEmber (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/ember-cli-update/src/get-start-and-end-commands.js:230:11)
    at async createProject (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/ember-cli-update/src/get-start-and-end-commands.js:245:9)
    at async _prepareCommand (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/boilerplate-update/src/get-start-and-end-commands.js:54:17)
    at async AsyncFunction.prepareCommandUsingRemote (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/boilerplate-update/src/get-start-and-end-commands.js:110:10)
    at async AsyncFunction.prepareCommand (/Users/sihmig/.npm/_npx/f4f35b2eda398bf9/node_modules/boilerplate-update/src/get-start-and-end-commands.js:193:10)
    at async Promise.all (index 0) {
  shortMessage: 'Command failed with exit code 1: npx ember-cli@3.16 new my-project -sg -sn -sb -b @embroider/addon-blueprint@1.3.0 --pnpm --ci-provider=github --typescript',
  command: 'npx ember-cli@3.16 new my-project -sg -sn -sb -b @embroider/addon-blueprint@1.3.0 --pnpm --ci-provider=github --typescript',
  escapedCommand: 'npx "ember-cli@3.16" new my-project -sg -sn -sb -b "@embroider/addon-blueprint@1.3.0" --pnpm "--ci-provider=github" --typescript',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: 'WARNING: Node v18.12.1 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details.\n' +
    "The option '--pnpm' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.\n" +
    "The option '--ci-provider' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.\n" +
    "The option '--typescript' is not registered with the 'new' command. Run `ember new --help` for a list of supported options.\n" +
    'Error creating new application. Removing generated directory `./my-project`',
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

The exact reason why this blueprint fails is not as interesting as the fact that ecu runs it with an old version of EmberCLI 3.16! 🤔 One that apparently the blueprint does not work with, but that's ok IMHO, we can require to run it only with recent versions, not? (e.g. the --typescript flag in EmberCLI is only properly supported (for our use case) with 4.10.0 (currently beta)...

@simonihmig
Copy link
Collaborator Author

For the record: I have ember-cli@4.10.0-beta.0 installed globally (volta install) on my machine, and never had 3.16 on it AFAICT.

@kellyselden how does ecu bring in ember-cli, if not relying on the globally installed version? I see a reference to 3.16 in its package.json here, but that's only a devDependency...

@simonihmig
Copy link
Collaborator Author

Ok, I think I found it here and here.

Seems like a missing feature in ecu, to have a way to specify the (minimum?) EmberCLI version a blueprint should run with, maybe defined in ember-cli-update.json?

@simonihmig
Copy link
Collaborator Author

For the record, ember-cli/ember-cli-update#1240 fixed the original error reported above, but it's still not working quite right: ember-cli/ember-cli-update#1248

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant