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.

Import fails with "Failed to execute 'ImportScripts' on 'WorkerGlobalScope'"

See original GitHub issue

I’ve just started a new react-native project (using the normal cli, not expo). I have installed this package using yarn:

yarn add react-native-vector-icons
react-native link

…which seemed to be successful, but when I import the package (just the import, not even using it yet), I get the following error.

e.g.:

import Icon from 'react-native-vector-icons/FontAwesome'

image

I’ve tried uninstalling, unlinking, re-doing the install etc… no luck. I then also tried to add that gradle line to apply the plugin, as per the README, but that didn’t change anything.

Any ideas?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:16

github_iconTop GitHub Comments

140reactions
konstantin-mohincommented, Apr 16, 2018

just close debugging tab in your browser and turn off Debug JS Remotely

26reactions
ralph-devcommented, Dec 26, 2019

For future people that come across this.

This issue occurs because you are trying to serve an offline bundle and debug it in the browser. If you used npm run build:ios to generate your bundle it probs is offline. Thus when you run react-native run-ios you your thing works. But as soon as you debug js remotely it fails because it’s an offline-only bundle. So make sure you do npm start – --reset-cache to serve a dynamically generated bundle.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught NetworkError: Failed to execute 'importScripts' on ...
For my case i was importing PouchDB like this: importScripts("//cdn.jsdelivr.net/pouchdb/5.3.1/pouchdb.min.js");. The url should start with proper ...
Read more >
[HELP]Failed to execute 'importScripts' on 'WorkerGlobalScope'
Hi , Because custom visuals are executed in sandboxed iframes, they have no origin and loading additional scripts via workers is not ...
Read more >
Why the panel development error prompt:Failed to execute ...
Why the panel development error prompt:Failed to execute 'importScripts' on 'WorkerGlobalScope'? ... You need to make sure that: The real computer ...
Read more >
Failed to execute 'importScripts' on 'WorkerGlobalScope' Error ...
... Failed to execute 'importScripts' on 'WorkerGlobalScope' Error. Nicolas Charpentier. Moved from https://github.com/facebook/react-native/issues/9150.
Read more >
Failed To Execute 'Importscripts' On 'Workerglobalscope ...
I see Could not load worker warning in the browser console. Also I tried to import the json. Ask questionsImport fails with Failed...
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