metro-bundler

react-native metro bundler error: bundling failed: ReferenceError: SHA-1 for file

烈酒焚心 提交于 2021-01-29 12:58:32
问题 I am getting the an error when I am using react-native start , the bundler error is: bundling failed: ReferenceError: SHA-1 for file /home/suvodip/.nvm/versions/node/v8.17.0/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js (/home/suvodip/.nvm/versions/node/v8.17.0/lib/node_modules/react-native/node_modules/metro/src/lib/polyfills/require.js) is not computed at DependencyGraph.getSha1 (/home/suvodip/.nvm/versions/node/v8.17.0/lib/node_modules/react-native/node

TypeError: cb.apply is not a function

落爺英雄遲暮 提交于 2021-01-20 17:58:51
问题 I'm trying to run an existing React Native project that uses Metro Bundler. My operating system is Ubuntu 20.04 and I've tried to run the app both on a physical Android device and on an Android simulator that I created with Android Studio. I have successfully cloned the project's repo, installed its dependencies ( yarn ), built the app ( react-native run-android ), and opened the app on my phone and simulator. However, running react-native start errors out saying TypeError: cb.apply is not a

TypeError: cb.apply is not a function

試著忘記壹切 提交于 2021-01-20 17:57:40
问题 I'm trying to run an existing React Native project that uses Metro Bundler. My operating system is Ubuntu 20.04 and I've tried to run the app both on a physical Android device and on an Android simulator that I created with Android Studio. I have successfully cloned the project's repo, installed its dependencies ( yarn ), built the app ( react-native run-android ), and opened the app on my phone and simulator. However, running react-native start errors out saying TypeError: cb.apply is not a

TypeError: cb.apply is not a function

ⅰ亾dé卋堺 提交于 2021-01-20 17:57:40
问题 I'm trying to run an existing React Native project that uses Metro Bundler. My operating system is Ubuntu 20.04 and I've tried to run the app both on a physical Android device and on an Android simulator that I created with Android Studio. I have successfully cloned the project's repo, installed its dependencies ( yarn ), built the app ( react-native run-android ), and opened the app on my phone and simulator. However, running react-native start errors out saying TypeError: cb.apply is not a

Running RN View in existing android app gives error Unable to load script

不羁岁月 提交于 2020-08-10 18:51:06
问题 I have integrated existing android app in react native app. When I run using react native cli it opens the app and after clicking a button to open RN view it gives the error Unable to load script Make sure you are either running a Metro server or that your bundle 'index.android.bundle' is packaged correctly for release (refer image) If I manually create the index.android.js using command react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src

import file dynamically by variable - react native

断了今生、忘了曾经 提交于 2020-05-29 05:19:20
问题 I have a path.json file that contains the path of a component // path.json { "main": "./login/index.js", "paths": [ { "name": "login", "path": "./login/index.js", "image": "" } ] } I want to load './login/index.js' file dynamically in react native and render this particular file My current implementation const MyComponent = createLazyContainer(() => { const componentPath = PathJson.main; // ./login/index.js return import(`${componentPath}`); //import error here @ line 7 }); export default

react-native start giving Invalid regular expression invalid error

一曲冷凌霜 提交于 2020-02-26 09:15:10
问题 I followed following link to get started with react-native Getting started with react native I tried to create native app without expo so i as per documentation i followed following command npm install -g react-native-cli react-native init AwesomeProject After run android command react-native run-android It gave me following error on emulator So i used start command to run metro server react-native start This command gave me another error in console 回答1: There are a problem with Metro using

react-native start giving Invalid regular expression invalid error

*爱你&永不变心* 提交于 2020-02-26 09:14:00
问题 I followed following link to get started with react-native Getting started with react native I tried to create native app without expo so i as per documentation i followed following command npm install -g react-native-cli react-native init AwesomeProject After run android command react-native run-android It gave me following error on emulator So i used start command to run metro server react-native start This command gave me another error in console 回答1: There are a problem with Metro using

react-native APK crash with “Unknown” error

﹥>﹥吖頭↗ 提交于 2019-12-01 11:52:06
My react-native developing environment on Windows 7; worked fine until yesterday, but suddenly the APK reports an error after it loads the bundle. The error Message: Unknown run NativeRunnable.java handleCallback Handler.java:873 dispatchMessage Handler.java:99 dispatchMessage MessageQueueThreadHandler.java:29 loop Looper.java:193 run MessageQueueThreadImpl.java:232 run Thread.java:764 I did google for the error, but no luck. I tried clearing the cache using npm start -- --reset-cache , but the error remains. I found and tried similar posts but their solutions did not work either. Error Logcat