Closed mglaman closed 3 years ago
Good point @mglaman !
Thoughts about this @bchavet ? I think the instructions for installing node have varied over the years, so I wonder if we'd have something that was prone to becoming outdated.
It seems like this is standard:
# Adding the NodeSource APT repository AND the PGP key for verifying packages
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
Just the version changes. For my project, we are using setup_10.x
An interesting alternative would be to follow CircleCI's pattern of image variants: https://circleci.com/docs/2.0/circleci-images/#language-image-variants
For example: php:7-node-apache
would give you PHP, 7.LATEST, Apache, PHP FPM, and Node
Adding this here:
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
There isn't any documentation on installing Node to a build and having access to npm.
I read https://docs.tugboat.qa/setting-up-services/how-to-set-up-services/leverage-service-commands/, and assumed
apt-get install nodejs
would work, and it didn't.I then found this sample: https://github.com/TugboatQA/Gatsby-Starter-Kit/blob/main/.tugboat/config.yml
Given most projects have compiled assets, this would be useful.