Building a bundle for Browsers fails
See original GitHub issueLooks to be cause by a problem reported upstream as https://github.com/sodium-friends/sodium-universal/issues/6
npm run build
fails with:
❯ npm run build
> hyper-sdk@3.0.2 build /Users/Paul/Projects/hyper/sdk
> cross-env BABEL_DISABLE_CACHE=1 browserify -t [ babelify --global ] --standalone hyperSDK index.js > hyper-sdk-bundle.js
Error: Can't walk dependency graph: Cannot find module './crypto_auth' from '/Users/Paul/Projects/hyper/sdk/node_modules/sodium-universal/index.js'
required by /Users/Paul/Projects/hyper/sdk/node_modules/sodium-universal/index.js
at /Users/Paul/Projects/hyper/sdk/node_modules/resolve/lib/async.js:137:35
at load (/Users/Paul/Projects/hyper/sdk/node_modules/resolve/lib/async.js:156:43)
at onex (/Users/Paul/Projects/hyper/sdk/node_modules/resolve/lib/async.js:181:17)
at /Users/Paul/Projects/hyper/sdk/node_modules/resolve/lib/async.js:15:69
at FSReqCallback.oncomplete (fs.js:183:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! hyper-sdk@3.0.2 build: `cross-env BABEL_DISABLE_CACHE=1 browserify -t [ babelify --global ] --standalone hyperSDK index.js > hyper-sdk-bundle.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the hyper-sdk@3.0.2 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Paul/.npm/_logs/2020-12-15T10_44_05_883Z-debug.log
Oh, and there is a missing npm install
between cd sdk
and npm run build
in the readme.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Problem by creating bundle for usage in browser #259 - GitHub
I tried to create the bundle with browserify but there is the browser script missing and by creating a webpack I got the...
Read more >Polymer 3 build - bundle errors in browser when trying to ...
I have a Polymer 3 app that works with no issues. But if I build and bundle it I am having issues when...
Read more >Building without bundling: How to do more with less
Unbundled roadblock #2: Most npm packages—even primarily web-focused packages—require a Node.js-like environment and will fail in the browser.
Read more >Browser module loading - can we stop bundling yet? - sgom.es
I'm Sérgio, and I work with Web frontend code. Sometimes I write about it here.
Read more >Improving JavaScript Bundle Performance With Code-Splitting
Evaluate the resulting bundle (file size and performance gains). If the bundle doesn't significantly decrease the bundle file size or improve ...
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
While typing my reply, above, I noticed that there was an incoming update to Firefox - retesting with this updated version Firefox 84.0 the tests all pass. So it looks as if pinning
sodium-universal
to 3.0.2 helps.Not looked into all the changes that Firefox 84.0 brings. But, I do know that it corrects a long standing issue with the handling of localhost, adding support for localhost subdomains.
Closing this. The release of sodium-universal@3.0.4 has fixed this issue.