Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using FlatList: Failed to execute 'importScripts' on 'WorkerGlobalScope #3

Closed
q3e opened this issue Oct 29, 2017 · 5 comments

Comments

@q3e
Copy link
Owner

q3e commented Oct 29, 2017

I get this error when I import flatList into my react-native app. When I have FlatList as an import:
import { Text, FlatList } from 'react-native'

from the expo simulator screen

img_20171029_083459

abi21_0_0.com.facebook.react.common .JavascriptException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://1 92.1 68.0.1 3:19001/ node_modules/react-native-scripts/ 

build/bin/crna-entry.bundle? platform=android&dev=true&strict=false&min 

ify=false&hot=false&assetPlugin=expo/tools/ hashAssetFiles' failed to load. 

Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http:// 192.168.0.13:19001/node_modules/reactnative-scripts/build/bin/crna-entry.bundle? platform=android&dev=true&strict=false&min ify=faIse&hot=false&assetPlugin=expoltoolsl hashAssetFiles' failed to load. 

loadApplicationScript WebsocketJavaScriptExecutor.java:173 

run NativeRunnable.java

Something like this facebook/react-native#13558 and this facebook/react-native#6035

@q3e
Copy link
Owner Author

q3e commented Oct 29, 2017

fixed by changing the renderItem prop

          data={responseData}
          renderItem={({item}) => <Text >{item.node.nameWithOwner}</Text>}
        />

https://stackoverflow.com/questions/46997358/error-when-rendering-flatlist-with-default-props-failed-to-execute-importscript

@q3e q3e closed this as completed Oct 29, 2017
@q3e
Copy link
Owner Author

q3e commented Oct 30, 2017

With his error, you are almost sure it's an issue with your export or import statements... e.g check any file you might have exported or default exported twice...

@q3e
Copy link
Owner Author

q3e commented Feb 21, 2018

@PeterHassaballah
Copy link

Try restarting your metro bundler .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants