-
Notifications
You must be signed in to change notification settings - Fork 119
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
Why is node-pre-gyp
a bundled dependency?
#157
Comments
I had thought it was necessary for it to work, but I can't say with any certainty that my assumption was right or that it hasn't changed. May be worth reevaluating |
It does seem to work smoothly. I guess as a next step we could try publishing to npm with a prerelease tag to help make sure. @indieisaconcept @springmeyer do either of you have any insight regarding why this has been a bundled dependency so far? |
I would recommend sticking with bundling. If you don't bundle then downstream installs that also include |
@eatrocks does that answer your question? |
Yes, that's what I was hoping to learn. Thanks @springmeyer , @bnoordhuis , and @es128 |
Thanks for chiming in @springmeyer, I learned something today. (Also, that's a pretty bad flaw in npm.) |
Thanks for details @springmeyer , looks like nasty bug in npm, has it been reported there? |
@dunnock - it boils down to: node-pre-gyp must be bundled. If it is should not be a problem or npm bug that is involved. This ticket was about why the bundling is needed. As far as I know fsevents has always bundled node-pre-gyp. So there is no npm bug to blame. If you are hitting an install problem with fs-events being installed with node-pre-gyp, then the problem is likely something different that what is discussed above. |
@springmeyer thanks for clarification, I get
|
@dunnock is there another package in your tree that depends on node-pre-gyp? Also, is that a fatal error or just a warning? |
I am also seeing this Yarn warning. In my
Can we remove it from |
@OliverJAsh I think you misunderstand. That yarn warning means there is more than one package in your dependencies that depends on node-pre-gyp, not that fsevents doesn't have to depend on node-pre-gyp. |
I have double checked and this is the only package depending on that
module.
…On Sat, 30 Sep 2017, 12:55 Ben Noordhuis, ***@***.***> wrote:
@OliverJAsh <https://github.com/oliverjash> I think you misunderstand.
That yarn warning means there is more than one package in your dependencies
that depends on node-pre-gyp, not that fsevents doesn't have to depend on
node-pre-gyp.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#157 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA4QCQcGo-tN8PsfhO1EXkwHcAHgxl3zks5sniwlgaJpZM4LF68t>
.
|
Unlikely, otherwise why would yarn print that error? Note that it could be a order n dependency, i.e., from somewhere in the full dependency graph, not just what you have listed in your package.json. |
You can try this in an empty Yarn project:
If I inspect
To demonstrate that I have two versions in my Node modules:
I could be missing something, but it looks like there is nothing else relying on If nothing else depends on |
Ah okay, I think I understand now. Is this what you are requesting we change? diff --git a/package.json b/package.json
index 2ed9082..5b3a185 100644
--- a/package.json
+++ b/package.json
@@ -4,8 +4,7 @@
"description": "Native Access to Mac OS-X FSEvents",
"main": "fsevents.js",
"dependencies": {
- "nan": "^2.3.0",
- "node-pre-gyp": "^0.6.36"
+ "nan": "^2.3.0"
},
"os": [
"darwin"
@@ -44,6 +43,7 @@
],
"homepage": "https://github.com/strongloop/fsevents",
"devDependencies": {
+ "node-pre-gyp": "^0.6.36",
"tap": "~0.4.8"
}
} |
@bnoordhuis I think that would work! |
Can we re-open this? |
Reopened but see my comment in #187. |
#187 was fixed, so can we fix this issue now? |
I previously said:
And
Recently I found this is no longer the case with recent npm. I can no longer trigger the problems I describe above with node >= 4. So I've now unbundled node-pre-gyp from most of the deps I maintain that use it, and removed the bundling recommendations at mapbox/node-pre-gyp#403 So, I think it is 👍 for fsevents to no longer bundle node-pre-gyp and rather just list it in the normal |
We'll remove node-pre-gyp as part of moving to N-API. This is in #237 |
This isn't a bug nor an issue, however I'm curious why you chose to make
node-pre-gyp
a bundled dependency.I noticed because despite only one occurrence of
node-pre-gyp
in my dependency tree, npm (v3+) didn't flatten it into the root of mynode_modules
. I'm assuming that's because it's a bundled dependency.I found this same non-flattening behavior with
jstransform
andesprima-fb
but in that caseesprima-fb
is not a bundled dependency ofjstransform
, so there must be a different cause in that case.thanks.
The text was updated successfully, but these errors were encountered: