-
Notifications
You must be signed in to change notification settings - Fork 436
NPM packages with subfolders don't work? #1618
Comments
Hi @wassafr! Can you create a repo with the bug, to let me reproduce it locally? |
I tried to reproduce this at https://github.com/IvanSanchez/brunch-bug-1618 , with
but Brunch works as expected. |
Interesting. I am experiencing the same issue as wassafr |
Still experiencing this problem. Does anyone have any workarounds? |
same here... i am trying to use the braintree web drop in npm install --save braintree-web-drop-in And it complains about some @braintree scoped packages not being available.. I am running brunch 2.10.17 - which I believe should allow these packages |
@nwallis Braintree engineer here, the issue is that brunch is using the browserified version of Drop-in found in the var dropin = require('braintree-web-drop-in/index.js'); It forces brunch to use the uncompiled version instead of defaulting to the browser ready version. For the Brunch devs, is there a way for Brunch to not care about the |
Drop-in issue for reference: braintree/braintree-web-drop-in#432 |
Trying to include an NPM package with a vendor subfolder, (zipjs-browserify), generates the following error when loading the page in the browser :
I've create a separate projet without brunch and included zips-browserify manually, it works straight out so I don't think the issue is with zipjs-browserify.
When looking at the compiled file, I can see code from
zipjs-browserify/index.js
but no code from the files that are inzipjs-browserify/vendor
.If I add
node_modules/zipjs-browserify/vendor
to the watched list, the error disappear but I get a new one :ReferenceError: Can't find variable: __dirname
(__dirname is used by zipjs-browserify). I think this one is out of scope.One more thing that may be important : zipjs-browserify is not called directly from my code but from another library (ip-extract-info).
So, do I need to manually add every subfolder of each NPM modules ?
Environment
package.json
contentsbrunch config contents
The text was updated successfully, but these errors were encountered: