Closed ichim-david closed 9 months ago
Happens for me also.
Seems related to https://github.com/plone/volto/pull/5406 -- even if I have yo 4.x installed globally, @plone/generator-volto now uses 5.x, and https://github.com/yeoman/generator/issues/1294 says it no longer includes install actions by default.
/cc @sneridagh
We can change the helper with a command exec.
It's s oneliner and an import from the standard lib.
Eventually this package has to be converted to ESM, since yo has moved to it.
@sneridagh @davisagli I have to admit I don't really understand what skip-install is supposed to do. I tried to replace yarnInstall with addDepenencies and I still got a failure but simply commenting this line: https://github.com/plone/volto/blob/main/packages/generator-volto/generators/app/index.js#L255
got me this output: https://gist.github.com/ichim-david/7571a8e2bfce4c586337883c72a875e2
When I went inside the created project and entered yarn install it starting installing.
As such to me it would seem that it would work even without trying to install something since the dependency was null but again I don't understand this well enough to know if it would be a good or bad thing.
EDIT: I see that it copies the project also inside src/addons so it's not ok to simply comment that line
@ichim-david the generator run "yarn install" by default, once the generator ended. It seems they deprecated the built-in (yarnInstall
) helper method, so we have two options:
skip-install
option should be removed, because it will always don't install.@sneridagh I've added https://github.com/plone/volto/pull/5438 this fix will ensure that yarn runs as soon as the project is created. The pattern is taken directly from the v5 branch https://github.com/yeoman/generator/blob/v5/lib/actions/install.js#L16C4-L16C83
I still think there is an issue with the generator since it adds an addon with the same name even though it says false for adding an addon however this might be a separate issue https://gist.github.com/ichim-david/02d91265037d97cdb96c9e6771deaae6
I still think there is an issue with the generator since it adds an addon with the same name even though it says false for adding an addon however this might be a separate issue https://gist.github.com/ichim-david/02d91265037d97cdb96c9e6771deaae6
This is actually on purpose apparently although from the docs it would appear only to be done so in the cookie-cutter template, instead, it is also applied when using only the generator. I've added the new issue https://github.com/plone/volto/issues/5439 where I mention this documentation miss.
With Yo 4.3.1 and 5.0.0 when running the following install commands: npm install -g yo npm i @plone/generator-volto yo @plone/volto myproject
The project is failing to generate due to this exit error: An error occured while running @plone/volto:app#install Error @plone/volto volto-latest-generator this.yarnInstall is not a function