addon-blueprint
addon-blueprint copied to clipboard
Running ember-cli-update on generated v2 addon fails
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 [email protected] new my-project -sg -sn -sb -b @embroider/[email protected] --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 [email protected] new my-project -sg -sn -sb -b @embroider/[email protected] --pnpm --ci-provider=github --typescript',
command: 'npx [email protected] new my-project -sg -sn -sb -b @embroider/[email protected] --pnpm --ci-provider=github --typescript',
escapedCommand: 'npx "[email protected]" new my-project -sg -sn -sb -b "@embroider/[email protected]" --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)...
For the record: I have [email protected] 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...
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
?
For the record, https://github.com/ember-cli/ember-cli-update/pull/1240 fixed the original error reported above, but it's still not working quite right: https://github.com/ember-cli/ember-cli-update/issues/1248