-
Notifications
You must be signed in to change notification settings - Fork 101
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
Incompatibility with global-style #151
Comments
Could you share the error you're getting? I can't reproduce this. Dependencies of dependencies are resolved from their own directory, ie. doing |
Ok. That was my fault. I oversimplified the issue away, though it was still causing an error on my end due to a file I failed to clean up. I'm having real trouble drilling this down to a minimal working example though. (Or at least I've spent like 5 hours trying to do so already.) My suspicion though is there isn't too much that can be peeled away to still show this error (at least in terms of the complexity of the directory organization). What I was trying to do was build the app Frida. One module in this app is called
(This last command is effectively run during a build step, but these steps are simpler than compiling the whole thing.) This all works fine is Note: There is arguably a bug in Even after doing that though, the following error results:
|
gumjs specifies the babelify transform in its package.json, but it's missing in the dependencies key. it only works accidentally with npm 3 and up because of flattening, but won't work with global-style or alternative clients like pnpm. transforms must be installed in the node_modules directory next to the package.json (or a node_modules in a parent directory), just like any other package. |
|
It's how the resolution algorithm works—just like how in CJS files, I'm not sure about uglifyify, but I don't see it anywhere in the code samples you posted. I would guess there is another similar problem inside a frida-compile related module. e; Specifically i would guess there is a |
Yes it's on line 216 of
I guess where I'm lost is that I'm not 100% fluent in this though, so I could be missing something. Am I? Thanks so much for all your help. |
So this just caused me major headache: if you have
global-style
active in yournpmrc
,browserify
won't find dependencies of your dependencies.It would be very helpful if
browserify
were able to locate these modules even if they are in subdirectories ofnode_modules
. At the very least, a warning would be immensely helpful (perhaps at package install time) ifglobal-style
is set.Another idea is to check
package-lock.json
. It seems to keep track of ifglobal-style
is being used, so checking it could either be used to generate a warning, or to resolve the actual location of a dependency.To reproduce this issue, simply create a package with the following
package.json
:.. and then create a JS file with:
Finally, run
npm i
only after turningglobal-styles
on.The text was updated successfully, but these errors were encountered: