iOS Bundling failed 112ms
Unable to resolve module native-base from C:\Users\luizf\Bop\bop\App.tsx: native-base could not be found within the project or in these directories:
node_modules
..\..\node_modules
2 |
3 |
> 4 | import { NativeBaseProvider } from 'native-base';
| ^
5 |
6 | import { SingIn } from './src/screens/SignIn';
7 |
can anyone help? thank you
I already installed react native
Related
I had used react native linear gradient as one of my packages in my react native project. It was working when I installed it, but after a few days it started showing an error saying unable to resolve react-native-linear-gradient from so and so file. I don't know why I started getting this error. I reinstalled that package by using:
npm i react-native-linear-gradient --force
Here is the error:
error: Error: Unable to resolve module react-native-linear-gradient from C:\Users\sawan\OneDrive\Desktop\WorkoutApp\workout\src\screens\SignInScreen\SignInScreen.js: react-native-linear-gradient could not be found within the project or in these directories:
node_modules
7 | import CustomButton from '../../components/CustomButton';
8 | import {useNavigation} from '#react-navigation/native';
> 9 | import LinearGradient from 'react-native-linear-gradient';
| ^
10 |
11 | const API_URL = Platform.OS === 'android' ? 'http://localhost:3000' : 'http://192.168.2.143:3000';
12 |
How can I resolve this issue?
i just did ( npm audit fix ) in my porject and after that im getting this error .
error:
Error: Unable to resolve module fbjs/lib/invariant from C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\react-native-reanimated\src\createAnimatedComponent.js: fbjs/lib/invariant could not be found within the project or in these directories:s:413:43)
node_modulesresolve (C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\metro\src\lib\transformHelpers.js:317:42
....\node_modules
at resolve (C:\Users\HP\Desktop\NoumanTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDependencies.js:
If you are sure the module exists, try these steps:
Clear watchman watches: watchman watch-del-all\node_modules\metro\src\DeltaBundler\traverseDependencies.js:645:26
Delete node_modules and run yarn install
Reset Metro's cache: yarn start --reset-cacheoumanTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDepe
Remove the cache: rm -rf /tmp/metro-*
10 | import setAndForwardRef from './setAndForwardRef';odules\metro\src\DeltaBundler\traverseDependencies.js:329:33
11 | Generator.next (<anonymous>)
12 | import invariant from 'fbjs/lib/invariant';manTestingApp-master\node_modules\metro\src\DeltaBundler\traverseDepen
| ^
13 | import { adaptViewConfig } from './ConfigHelper';d. Please run:
14 | import { RNRenderer } from './reanimated2/platform-specific/RNRenderer';
15 |orm[stderr]:
i try npm install fbjs but it doesn't work for me
I am new to react native, I was learning the Axios, for that I tried to install it by using command
npm install axios
but later on, my app started showing this error
error: Error: Unable to resolve module react-native from D:\work\app_dev\AxiosWorking\AxiosProject\index.js: react-native could not be found within the project or in these directories:
node_modules
If you are sure the module exists, try these steps:
1. Clear watchman watches: watchman watch-del-all
2. Delete node_modules and run yarn install
3. Reset Metro's cache: yarn start --reset-cache
4. Remove the cache: rm -rf /tmp/metro-*
3 | */
4 |
> 5 | import {AppRegistry} from 'react-native';
| ^
6 | import App from './App';
7 | import {name as appName} from './app.json';
8 |
at ModuleResolver.resolveDependency (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:129:15)
at DependencyGraph.resolveDependency (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\node-haste\DependencyGraph.js:288:43)
at Object.resolve (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\lib\transformHelpers.js:129:24)
at resolve (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:396:33)
at D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:412:26
at Array.reduce (<anonymous>)
at resolveDependencies (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:411:33)
at processModule (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:140:31)
at async traverseDependenciesForSingleFile (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:131:3)
at async traverseDependencies (D:\work\app_dev\AxiosWorking\AxiosProject\node_modules\metro\src\DeltaBundler\traverseDependencies.js:60:7)
I have removed some packages in my react native.Removed the package import from all files .After I have done that my app can't start even I clear the cache using below procedure .
rm -rf node_modules # With Yarn workspaces, you may need to
# delete node_modules in each workspace
yarn cache clean
yarn
watchman watch-del-all
rm -fr $TMPDIR/haste-map-*
rm -rf $TMPDIR/metro-cache
expo start --clear
this my error
Failed building JavaScript bundle.
Unable to resolve module cloudinary-react from /Users//Desktop/react-native-with-firebase-course/my-test-project/screens/Home.js: cloudinary-react could not be found within the project.
If you are sure the module exists, try these steps:
Clear watchman watches: watchman watch-del-all
Delete node_modules and run yarn install
Reset Metro's cache: yarn start --reset-cache
Remove the cache: rm -rf /tmp/metro-*
7 | import {Card, Button} from 'react-native-paper';
8 | import firebase from '../database/firebaseDb';
9 | import {Image as Image1, Transformation, Placeholder} from 'cloudinary-react'
| ^
10 |
11 | import { createStackNavigator, createAppContainer } from 'react-navigation';
12 |
Failed building JavaScript bundle.
Unable to resolve module cloudinary-react from /Users//Desktop/react-native-with-firebase-course/my-test-project/screens/Home.js: cloudinary-react could not be found within the project.
If you are sure the module exists, try these steps:
Clear watchman watches: watchman watch-del-all
Delete node_modules and run yarn install
Reset Metro's cache: yarn start --reset-cache
Remove the cache: rm -rf /tmp/metro-*
7 | import {Card, Button} from 'react-native-paper';
8 | import firebase from '../database/firebaseDb';
9 | import {Image as Image1, Transformation, Placeholder} from 'cloudinary-react'
| ^
10 |
11 | import { createStackNavigator, createAppContainer } from 'react-navigation';
12 |
I'm building fist mobile project by using react-native, expo and lerna. But I have problem with lerna. When I type: yarn install all packages. My problem is that lerna push all module packages in mobile package to the outside node_modules folder so that the script to run react native is not available in mobile package. My question is that there are any solutions for lerna to recognize those modules out of package mobile scope.
This is my folder structure
| my-project/
| ---- node_modules/
| -------- react-native/
| -------- lerna/
| -------- expo/
| ---- package.json
| ---- lerna.json
| ---- packages/
| -------- mobile/
| ------------ node_modules/
| ---------------- bin/
| ------------------- react-native
| ------------------- react-native.cmd
| ------------ package.json