6

I am continuously running into this error while trying to learn react native. The app will run fine and then I make some additions and it breaks and shows this error:

error message

The code that is producing it is:

import React from 'react';
import {StyleSheet, View, Text} from 'react-native';

const App = () => {
  return (
    <View>
      <Text>Hello</Text>
    </View>
  );
};

const styles = StyleSheet.create({});

export default App;

Any information would be awesome, I just want a consistent dev environment to be able to work in. I have looked through similar posts however they all seem to already have functioning projects when receiving this error.

4 Answers 4

4

The fix is that it was a problem with the react-native debugger that apparently just happens sometimes, disable the debugger with ctr+m on the android device and debug using node command line or third party debugger

Sign up to request clarification or add additional context in comments.

Comments

2

Running below command fixed the issue for me.

cd android
./gradlew clean

Comments

0

I have faced similar issue. Apparently, my react native debugger is trying to reference a module from previous react native folder. (That time, I created 2 same react native folder, one as a backup. In case I messed up with the coding)

In order to fix this, I have to clear the react native cache. I found my answer in this post.

Comments

0

I had the same error in debug mode. The problem for me was that I had VPN turned on and my phone was not able to connect to React Native Debugger (on the same Wi-Fi).

Failed to execute 'importScripts' on 'WorkerGlobalScope':
The script at *http://192.168.88.104:8081/index.bundle//&platform=ios&dev=true&minify=false&inlineSourceMap=false&modulesOnly=false&runModule=true&app=com.squirrel.walnutsdev'
failed to load.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.