Problem/Motivation
Project should indicate which version(s) of node are supported for each release.
Steps to reproduce
Attempt to run npm install with the incorrect version. Errors will be displayed in terminal, until user upgrades/downgrades to correct node version.
Proposed resolution
There are multiple options for indicating which version(s) of node should be used for a release (even if we're not enforcing it programmatically):
- Add a line to the README documentation: "For version 5.0.2, please install and use node <= v10.23.3"
-
Use the package.json "engines" field to specify the version:
https://docs.npmjs.com/cli/v7/configuring-npm/package-json#engines{ "engines": { "node": ">=0.10.3 <15" } }
-
Add a nvmrc file to the project (for those using node version manager):
https://github.com/nvm-sh/nvm#nvmrc
Remaining tasks
Choose one of the options above, and update the codebase.
User interface changes
No UI changes required.
API changes
No API changes.
Data model changes
No Data model changes.
Thank you very much for creating this starter kit!!
Comment | File | Size | Author |
---|---|---|---|
#2 | 3199572-2.patch | 508 bytes | Pooja Ganjage |
Comments
Comment #2
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedHi,
Creating a patch for this issue.
Please review the patch.
Let me know if any suggestions.
Thanks.
Comment #3
Pooja Ganjage CreditAttribution: Pooja Ganjage at Asentech LLC commentedComment #4
candelas CreditAttribution: candelas as a volunteer commentedThanks #3. I was having problems in the installation with many errors and the node version resolved it.
Comment #5
segx CreditAttribution: segx commentedThis resolved my issue. Thank you!
Comment #6
candelas CreditAttribution: candelas as a volunteer commentedComment #7
griz CreditAttribution: griz commentedJust wasted an hour trying to get this working, before realising I needed to downgrade node.
Comment #8
hussainwebWhile this works, it doesn't feel like a good solution because we are now limiting only to outdated releases of Node. Node 12 and 14 are in maintenance modes only and they are the only supported ones allowed by the version constraint.
I hope we can also get #3259490: Errors on running npm install in subtheme on Node 16+ in so that we can improve the supported versions. For example, I am using this with Node 17 (and 16) without any errors.
Comment #9
emilcarpenter CreditAttribution: emilcarpenter as a volunteer commented@griz no need to downgrade Node.
I got
node install
working very easily with Node v16 with @hussainweb solution:https://www.drupal.org/project/bootstrap_sass/issues/3259490#comment-14379708
Comment #10
emilcarpenter CreditAttribution: emilcarpenter as a volunteer commentedComment #11
griz CreditAttribution: griz commentedAh, amazing - thanks!
Comment #12
hatuhay CreditAttribution: hatuhay commented