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.

Text does not load when running from local filesystem

See original GitHub issue

None of the text gets loaded when running from the local filesystem.

Looking at the console this seems to be the error

Access to XMLHttpRequest at 'file:///D:/Download/ac-nh-turnip-prices-master/ac-nh-turnip-prices-master/locales/en.json' from origin 'null' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
theRTC204commented, Apr 19, 2020

I’ve been using webpack-dev-server to host the app locally for dev.

It might be worth including a section in the README that describes a couple options for running the site in a lightweight development environment.

1reaction
peter50216commented, Apr 18, 2020

The best way to develop/run locally would be running a webserver locally. For example, running python -m SimpleHTTPServer in the folder. Many thing don’t work with file:// protocol because of security restrictions by browser (since browser definitely don’t want webpage to load arbitrary file from local file system), and I don’t think we can do anything to solve this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsdom does not fetch scripts on local file system - Stack Overflow
It has no idea how to resolve the (relative) path you give it (and tries to resolve from the default about:blank , which...
Read more >
The File System Access API: simplifying access to local files
The File System Access API enables developers to build powerful web apps that interact with files on the user's local device, such as...
Read more >
How to run things locally – three.js docs
If you use just procedural geometries and don't load any textures, webpages should work straight from the file system, just double-click on HTML...
Read more >
Edit files with Workspaces (Filesystem tab) - Microsoft Edge ...
You are running a local web server from the source code directory, so that the site is accessible at localhost:8080 .
Read more >
Managed folders — Dataiku DSS 11 documentation
Or because your code is not running on the DSS machine (Kubernetes execution for instance), and thus cannot directly access its filesystem. In...
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