Brunch fails packaging latest release from npm
See original GitHub issueGeneral 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:
- Created 5 years ago
- Comments:9 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m able to reproduce the issue. I think brunch is rewriting the
require
method, so even though the browserified build has defined arequire
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.
closing for inactivity. If you continue to encounter errors, please contact Support