question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Brunch fails packaging latest release from npm

See original GitHub issue

General information

  • SDK/Library version: 1.13.0
  • Build Environment: npm 5.6.0, node v8.94, brunch 2.10.17

Issue description

Installed latest braintree-web-drop-in with “npm install” and now brunch fails compilation because of: error: Processing of node_modules/braintree-web-drop-in/dist/browser/dropin.js failed. Error: Could not load module '../../browser-detection' from '/home/matteo/test/assets/node_modules/braintree-web-drop-in/dist/browser'. Make sure the file actually exists.

Previous release was ok. If I manually remove the browser key from node_modules/braintree-web-drop-in/package.json it works correctly.

Other packages that use the browser key in package.json are ok, so I don’t think is a brunch issue?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
crookedneighborcommented, Oct 4, 2018

I’m able to reproduce the issue. I think brunch is rewriting the require method, so even though the browserified build has defined a require function, brunch still thinks it needs to pull in the required modules.

If you use var dropin = require('braintree-web-drop-in/index.js'), it should work because then it will pull in the source version instead of the bundled version.

Gonna look into it and see if there’s anything we can do to better solve this.

0reactions
armandodlvrcommented, Nov 15, 2022

closing for inactivity. If you continue to encounter errors, please contact Support

Read more comments on GitHub >

github_iconTop Results From Across the Web

node.js - brunch build --production fails only in production
Sass compile fails under beta, so I locked it to alpha.6 for now. I think I need to start locking dependency versions.
Read more >
javascript-brunch - npm
Latest version: 2.10.0, last published: 6 years ago. Start using javascript-brunch in your project by running `npm i javascript-brunch`.
Read more >
postcss-brunch - npm
Latest version: 3.0.0, last published: 3 years ago. ... Add all plugins you want to use with PostCSS in your package.json file too....
Read more >
sass-lint-brunch - npm
Adds sass-lint support to brunch.. Latest version: 1.1.0, last published: 6 years ago. Start using sass-lint-brunch in your project by ...
Read more >
clean-css-brunch - npm
Adds CleanCSS support to brunch.. Latest version: 3.0.0, last published: 3 years ago. Start using clean-css-brunch in your project by ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found