drainpipe icon indicating copy to clipboard operation
drainpipe copied to clipboard

Node version is not specified on DDEV defaults to 20 on local and 18 on Tugboat

Open beto-aveiga opened this issue 1 year ago • 4 comments

When the node version is not specific on the .ddev/config.yml file, it defaults to 20 locally on DDEV, but on Tugboat, it is 18.

Then after running composer install with the node version set on the DDEV config file, you get an update in the init.sh for tugboat

image

Which means that node version is not sync locally and for Tugboat.

beto-aveiga avatar Jul 23 '24 00:07 beto-aveiga

What's interesting is the default config ddev generates has a node version in it. So I guess it would have been manually deleted?

I think it would be fine for us to throw an error if the node version isn't specified in ddev.

deviantintegral avatar Jul 23 '24 15:07 deviantintegral

What's interesting is the default config ddev generates has a node version in it. So I guess it would have been manually deleted?

Likely yes.

I think it would be fine for us to throw an error if the node version isn't specified in ddev.

@deviantintegral What about just throwing a warning?

beto-aveiga avatar Oct 03 '24 15:10 beto-aveiga

Why would you want to not specify the node version? At the least, I would have thought you'd want "auto" (which admittedly our Tugboat config won't do anything with).

https://ddev.readthedocs.io/en/stable/users/configuration/config/#nodejs_version

deviantintegral avatar Oct 03 '24 17:10 deviantintegral

I think about projects that do not have this for any reason, and then Drainpipe stop working when running composer install or when trying to deploy a Tugboat instance. A warning seems better than breaking a packages installation or breaking a deployment on Tugboat.

beto-aveiga avatar Oct 03 '24 18:10 beto-aveiga

I implemented a unique source of truth for the Node JS version to be installed for both Github Actions, DDEV and Tugboat, as part of https://github.com/Lullabot/drainpipe/pull/957. Then, once the pull request was finished, I discovered this one. Can someone review the PR and let me know if the approach implemented is fine? Any feedback is welcome. Thank you!

rabbitlair avatar Oct 17 '25 16:10 rabbitlair