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.

Building a bundle for Browsers fails

See original GitHub issue

Looks 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:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
paul90commented, Dec 16, 2020

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.

1reaction
paul90commented, Feb 15, 2021

Closing this. The release of sodium-universal@3.0.4 has fixed this issue.

Read more comments on GitHub >

github_iconTop 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 >

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