--skip-install not working
I’m creating my own generator and compose with this generator-node while trying to skip installing dependencies.
This used to work with version 4.2.0 however, it no longer does with a more recent 5.x version.
public async default() {
this.composeWith(require.resolve('generator-node/generators/app'), {
boilerplate: false,
name: this.options.name,
projectRoot: 'generators',
skipInstall: this.options["skip-install"],
});
}
👋 @springcomp I know it's been a while, but from https://github.com/yeoman/yeoman/issues/1779 we're rebooting maintenance here. Is this issue still something you're interested in resolving?
If so, could you please post a full reproduction (https://antfu.me/posts/why-reproductions-are-required)? We'll need to be able to look at and run your code in order to help. Thanks! 🎩
Hello @JoshuaKGoldberg yes I’m very much interested in a proper solution for this issue. I’ll try and come up with a small repro case and will come back to you here.
Hey @JoshuaKGoldberg,
The snippet in the OP is coming out of my custom TypeScript generator.
This version is published as v0.8.0.
I can attest that it worked at the time with the following conditions:
- NodeJS
12.22.12 - Yo version
4.0.0
I will update this post to narrow down the versions after which it stopped working.
Closing out as non-actionable. If anybody has a reproduction / more information, please do post back. Cheers! 🎩
this.composeWith is async in yo 5 due to ESM import and should be sync in yo 6 with node that supports requiring ESM.
skipInstall is an environment option now, you should pass through cli or set it in environment.
this.env.options.skipInstall = true;