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.

bundle.run links and web browser example in the README are broken

See original GitHub issue

The README gives the following example for getting started with Dat in the browser:

<script src="https://bundle.run/dat-sdk@1"></script>
<script src="https://bundle.run/dat-sdk@1/promise.js"></script>
<script src="https://bundle.run/dat-sdk@1/auto.js"></script>
<script>
  const SDK = window.datSDK
  // Look at the examples from here
</script>

Unfortunately those script links are broken. Are there updated sources or an updated “Hello World” browser example you would recommend?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
mkroehnertcommented, Jan 22, 2021

@RangerMauve please ignore my report above. It wasn’t actually an issue with the hyper SDK, but in the index.htmlthat was loading it.

Since await can only be called in an async context, I wrapped const sdk = await SDK(...) in an async function but initially used the wrong syntax. However, I had to replace window.datSDK with window.hyperSDK, for which I created a PR.

In the end, this is what worked for me:

  <script src="hyper-sdk-bundle-3.0.3.js"></script>
  <script>
    const SDK = window.hyperSDK
    async function run() {
     const sdk = await SDK({persist: false})
    }
    run()
  </script>
1reaction
RangerMauvecommented, Apr 29, 2020

I suggest trying to build the bundle from source locally on your machine if you can. 😅 I guess bundle.run was the wrong choice to advertise in the docs after all.

Read more comments on GitHub >

github_iconTop Results From Across the Web

README.md · broken-links-business-ops · GitLab.com / www-gitlab ...
bundle exec middleman build. To test out the site, you must run another Web server from the public directory: (cd public; python3 -m...
Read more >
JustinBeckwith/linkinator: Scurry around your site and ... - GitHub
Scurry around your site and find all those broken links. ... README.md ... You can also download a standalone binary that bundles node,...
Read more >
File: README — Documentation for panorama-ed/memo_wise (main)
Add this line to your application's Gemfile: gem 'memo_wise'. And then execute: $ bundle install. Or install it yourself as: $ gem install...
Read more >
Common Issues - Snipe-IT Documentation
Many issues can be resolved if you remember to run the following commands when you encounter weird errors: These commands should be run...
Read more >
How to use links in documentation - Contributor guide
For example, entering https://xref.learn.microsoft.com/autocomplete?text=Writeline in the address bar of your browser displays all the types ...
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