-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Yarn installation errors (and npm installation warnings) under node 4.x #4908
Comments
I have filed issues on |
Another workaround, perhaps less dangerous than the {
"dependencies": {
"serverless": "^1.26.1"
},
"resolutions": {
"**/uri-js/punycode": "1.4.1"
}
} With that resolution override in place, the error from yarn is reduced to a warning: |
@ethanherbertson Do people still use Node 4 in production? I'm curious if there are any good reasons to keep supporting it. |
The market share for node 4 is definitely dwindling, and indeed my group is mostly working with node 6 and node 8 in our projects now. Since node 4 is no longer receiving security updates, it's probably reasonable to stop supporting it explicitly in package.json, rather than addressing this (essentially upstream) issue. |
@ethanherbertson Created a PR for that: #5331 |
Thanks for opening @ethanherbertson 👍 Yes, our current plan is to drop Node 4 support. Additionally we don't "officially" support yarn. I'll close this issue for now since @kibertoad already PRed a fix for that and we'll continue the discussion in the PR. |
This is a Bug Report
Description
For bug reports:
Installing serverless with yarn under node 4.8.4 raises an error due to node version incompatibility with punycode (punycode v2.x requires node 6+).
Installing serverless with npm under node 4.8.4 raises a warning about the same.
(NOTE: The incompatibility comes from nested dependencies, not from serverless's direct dependency on punycode. Specifically, the problem is coming from
json-refs
->uri-js
->punycode
,)Serverless explicitly supports node 4+ according to its
package.json
file, so I would expect installation to succeed without errors in yarn, and to succeed without warnings in npm.n/a
See screenshots below. (The npm warning shown is actually from your own Travis build.)
For feature proposals:
Similar or dependent issues:
Additional Data
Further notes
There is a workaround for yarn installs, which is to add the
--ignore-engines
flag to the yarn installation command. The framework seems to work under node 4 despite the error/warning about punycode; it's entirely possible that Serverless does not actually hit those parts ofjson-refs
that require those parts ofuri-js
that requirespunycode
. However, adding that flag means we are at greater risk of sudden breakages due to future incompatibilities (and without adding that flag we can't install recent versions of Serverless with our package manager of choice—yarn).The text was updated successfully, but these errors were encountered: