I installed react-native-elements through npm a while ago. This morning, I was trying to create an Overlay component from the package, but for some reason I kept getting an error that no such component existed. So, foolishly, I ran npm install react-native-elements again, and now every time I try to build I get the following error:
Unable to resolve ./social/SocialIcon" from "./C:\\Users\\L\\IdeaProjects\\FinalProject\\node_modules\\react-native-elements\\src\\index.js: The module ./social/SocialIcon could not be found"`.
I have react-native-vector-icons installed. I have no idea why this is happening.
Try install #expo/vector-icons
npm install #expo/vector-icons --save
https://github.com/react-native-training/react-native-elements/issues/620
Related
I'm not understanding what this error means
Is there something I need to install?
Try installing it via npm using
npm install #react-navigation/native
I am receiving an error while trying to use Typescript with my existing expo project.
While following the docs, I created a tsconfig.json file in the project root.
When running expo start, I am prompted to install the typescript dependencies. However, after these are successfully installed (tick message appears in console: √ Installed typescript#~4.3.5, #types/react#~17.0.21, #types/react-native#~0.67.6), I receive the following error:
It looks like you're trying to use TypeScript but don't have the required dependencies installed.
Please install #types/react by running:
yarn add --dev #types/react#~17.0.21
If you're not using TypeScript, please remove the TypeScript files from your project and delete the tsconfig.json.
error Command failed with exit code 1.
After following the instructions and running the yarn add .... command, I keep seeing the same error message.
I have tried deleting the node_modules folder and package-lock.json file to no avail. I have also tried following this answer.
Any assistance would be appreciated, thank you.
Seems to be a bug. It works if I install #types/react on the specific version that Expo requests (17.0.21).
yarn add --dev #types/react#17.0.21
Just re-install expo-cli npm install -g expo-cli.
I don't know which of the following worked, but I ran the following commands and the problem went away.
sudo npm install -g expo-cli
sudo npm install -g #types/react
sudo npm install -g #types/react-native
sudo npm install -g typescript
yarn add expo-cli
solved for me.
I had the same issue. I resolved it by :
1- delete the node_modules.
2- update expo to the latest version using npm i -g expo-cli
hope this will help someone
if you installed #types/react remove that from your dev dependencies
I created a basic react native app just to practice.
As a first step, I followed the docs below to create a navigation from one page to another:
https://reactnative.dev/docs/navigation
I'm using React Native CLI, and installed:
npm install #react-navigation/native #react-navigation/native-stack
npm install react-native-screens react-native-safe-area-context
and I copied the code from the docs to my App.js file. When I'm hitting npx react-native run-android, I'm getting the following error:
error: Error: Unable to resolve module react-navigation from C:\Users\sh\NewProject\App.js: react-navigation could not be found within the project or in these directories:
node_modules
I tried to delete node_modules and did npm install - didn't help.
Any idea how to resolve this? thanks
This error comes when library is not linked up or properly not imported. Please uninstall and try to install it again step by step.
I got the error below when I tried running my app,
ERROR Failed to compile with 1 error 4:09:21 AM
This dependency was not found:
* core-js/fn/promise in ./src/store/index.js
To install it, you can run: npm install --save core-js/fn/promise.
When I tried to install it, I bumped into another error message.
Could not install from "core-js/fn/promise" as it does not contain a package.json file.
i know this post is old but, I had the same problem.
You can fix that with this command
npm install es6-promise --save
in the vueX documentation :
https://vuex.vuejs.org/installation.html#promise
I learn Microsoft's manual about TypeScript + React + Redux.
I launched the command:
npm install -S redux react-redux #types/react-redux
But when I run the command npm run start I get the error:
Type error: Could not find a declaration file for module 'react'.
'C:/lab/my-app/node_modules/react/index.js' implicitly has an 'any'
type.
Ok, I run the command: npm i #types/react. now I get other error:
Type error: Module '"../../node_modules/#types/react-redux"' has no
exported member 'Dispatch'. TS2305
How can I fix it?
I had this problem when I initially created a React with TypeScript project, it made no sense since I had not started any work yet.
So in terminal I ran:
rm -rf node_modules/ && npm install
Then:
npm run start
And I was able to see the main landing page.
run the following:
pm install #types/react
It works for me!