bigcommerce / cornerstone

The BigCommerce Cornerstone theme
https://developer.bigcommerce.com/stencil-docs
287 stars 614 forks source link

Which version of node should I be using? #2383

Open amfischer opened 1 year ago

amfischer commented 1 year ago

Hello,

We are working on a site and using this cornerstone theme version 6.12 as a starting point.

The readme on this repository says:

Note: package-lock.json file was generated by Node version 10 and npm version 6.11.3. The app supports Node 10 as well as multiple versions of npm, but we should always use those versions when updating package-lock.json, unless it is decided to upgrade those, and in this case the readme should be updated as well. If using a different version for node OR npm, please delete the package-lock.json file prior to installing node packages and also prior to pushing to github.

If updating or adding a dependency, please double check that you are working on Node version 10 and npm version 6.11.3 and run npm update or npm install (avoid running npm install for updating a package). After updating the package, please make sure that the changes in the package-lock.json reflect only the updated/new package prior to pushing the changes to github.

The stencil-cli docs say we need to use node version 16.x or 18.x https://github.com/bigcommerce/stencil-cli#install

I'm currently using node v18.13.0, and when I run npm install everything seems fine but it makes a lot of changes to package-lock.json file.

The mention of Node version 10 on this readme is confusing me. It makes me think I need to use v10, which isn't maintained anymore.

BC-krasnoshapka commented 1 year ago

hi @amfischer , thanks for feedback, we need to update README as it's outdated. Since v. 6.12 that has #2373 package-lock.json is updated to latest version of lock file format, so everything should work with Node 18.x / npm 9.x

amfischer commented 1 year ago

@BC-krasnoshapka ok yes that makes sense. Thanks for clarifying.

AndrewBarber commented 1 year ago

@BC-krasnoshapka would it be a consideration to add an '.nvmrc' file to the repo? NVM is the suggested approach, so I feel this would be in line with the documentation.

BC-krasnoshapka commented 1 year ago

@AndrewBarber good idea, added, thanks.