Import fails with "Failed to execute 'ImportScripts' on 'WorkerGlobalScope'"
See original GitHub issueI’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'
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:
- Created 6 years ago
- Comments:16
Top 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 >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
just close debugging tab in your browser and turn off Debug JS Remotely
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.