Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Node version constraint at >= v11 #321

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vjau
Copy link

@vjau vjau commented Oct 9, 2022

Should fix #319
This change put a hard constraint on Node version number : npm should prevent users from installing if node version is under v11 which is the first version that has TextEncoder in the global object like in the browser.
Changes in package.json set the node version constraint in the engines entry.
The engine-strict directive in the added .npmrc file should tell npm to enforce the constraint at npm install time.
I modified documentation accordingly.
Alternatively, we could just limit the constraint to a warning in the documentation and let users install at their own risk.

Copy link
Collaborator

@pieper pieper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@pieper
Copy link
Collaborator

pieper commented Oct 11, 2022

The netlify checks are failing now, saying the node version is too old.

E.g. from https://app.netlify.com/sites/dcmjs/deploys/634281592ae0f90008b99d5c :

4:08:09 AM: Installing NPM modules using NPM version 6.13.4
4:08:10 AM: npm ERR! code ENOTSUP
4:08:10 AM: npm ERR! notsup Unsupported engine for dcmjs@0.24.0: wanted: {"node":">=11.0.0"} (current: {"node":"8.17.0","npm":"6.13.4"})
4:08:10 AM: npm ERR! notsup Not compatible with your version of node/npm: dcmjs@0.24.0
4:08:10 AM: npm ERR! notsup Not compatible with your version of node/npm: dcmjs@0.24.0
4:08:10 AM: npm ERR! notsup Required: {"node":">=11.0.0"}
4:08:10 AM: npm ERR! notsup Actual:   {"npm":"6.13.4","node":"8.17.0"}
4:08:10 AM: npm ERR! A complete log of this run can be found in:
4:08:10 AM: npm ERR!     /opt/buildhome/.npm/_logs/2022-10-09T08_08_10_287Z-debug.log
4:08:10 AM: Error during NPM install
4:08:10 AM: Build was terminated: Build script returned non-zero exit code: 1

Looks like @dannyrb removed the pinned version but perhaps we need to add it back now: 3e2978b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash due to no TextEncoder on nodejs
2 participants