-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Hard coded check for process.release.name === 'node' causing issues #2356
Comments
This was rolled into 2.3.3. Anybody using |
Previously, in order to only load dependencies which only work on Node.js and fail in non-Node.js environments, we introduced a check which did a string-comparison of `process.release.name` to see if it is was `node`. This was first introduced in 9c563fa as part of #2054, but has gone on to be useful for other purposes as well. Some Node.js forks such as NodeSource's N|Solid, which is a fork of Node.js which follows-up each Node.js release with a custom build that includes additional native addons but is otherwise the same, override this value with their own name. This means that N|Source returns `nsolid`, despite the fact that it is almost entirely the same as Node.js. Luckily, N|Solid leaves the base version of its Node.js in `process.versions.node` (and additionally adds its own `process.versions.nsolid`). By relaxing the string comparison on `process.release.name`, we should still be able to accurately detect the environment we want - which is "Close enough to Node.js!". Fixes #2356
Previously, in order to only load dependencies which only work on Node.js and fail in non-Node.js environments, we introduced a check which did a string-comparison of `process.release.name` to see if it is was `node`. This was first introduced in 9c563fa as part of #2054, but has gone on to be useful for other purposes as well. Some Node.js forks such as NodeSource's N|Solid, which is a fork of Node.js which follows-up each Node.js release with a custom build that includes additional native addons but is otherwise the same, override this value with their own name. This means that N|Source returns `nsolid`, despite the fact that it is almost entirely the same as Node.js. Luckily, N|Solid leaves the base version of its Node.js in `process.versions.node` (and additionally adds its own `process.versions.nsolid`). By relaxing the string comparison on `process.release.name`, we should still be able to accurately detect the environment we want - which is "Close enough to Node.js!". Fixes #2356
Thanks for reporting this! It should be fixed in v2.4.6 via #2357. I think relaxing of the We could consider another technique, but let's see how this works! I'm certainly open to any expert |
9 days ago in the following commit you added a check to see if the
process.release.name === 'node'
. This is causing our deploys to fail because we use nsolid. Please help!3f7a7f3#diff-c710f70502c84a5d7779daee202dbddb
The text was updated successfully, but these errors were encountered: