Unable to resolve a dependency in react native maps? - reactjs

Problem:
I have create react native application. There I am using react-native-maps. When bundle is building it laves this error on the console.
Unable to resolve "./lib/components/MapHeatmap.js" from
"node_modules\react-native-maps\index.js"
I look for a solution but I was unable to do so. And I have not any clue for what should do for this error.Thank you

i had the same error just now, try sudo npm uninstall react-native-maps and install it again with expo comand (if you are using expo).

I was also facing the same issue in react native (expo)
For me clearing the cache worked...
just type this command
expo start -c

in cli project run this command on your project
npm cache clean --force
then reinstall the node module ......
then npm install

Related

errors while install material-ui

I am trying to install material ui but I am facing multiple errors. I am making a website that has a map on it to show different outlets but when I try to install material ui and google maps api, I am facing many errors.
Command I am trying to run -
$ npm install #material-ui/core #material-ui/icons #material-ui/lab #react-google-
maps/api axios google-map-react
Error - Errors in terminal
This error comes on npm V8.x.x . To resolve
run the command below:
npm config set legacy-peer-deps true
You can find more about it here

Invariant Violation: RNCSafeAreaProvider was not found in the UIManager

I'm new to react native and have some experience with using regular React and am trying to get react native navigation setup but am running into the following error when following the docs. I've tried starting from scratch and reinstalling everything as I have no clue what this error means:
Invariant Violation: RNCSafeAreaProvider was not found in the UIManager
any advice on how to fix this would be appreciated.
I recently encountered this issue. I solved it by running yarn add react-native-safe-area-context.
for anyone who comes across this error - the way I did the installation must have been wrong as starting with a fresh project and doing the commands in this order - I did not come across the same problem:
expo init 'Project-name'
cd 'Project-name'
npm run android
npm install #react-navigation/native
expo install react-native-gesture-handler react-native-reanimated react-native-screens react-native-safe-area-context #react-native-community/masked-view
npm install #react-navigation/stack
I solved this issue by run these commands
npm install react-native-safe-area-context
pod install
As an additionnal case: I went into this error when using react-navigation in an Expo Bare workflow, also following guide for react-navigation.
I simply fixed this with:
projectRoot $ cd ios
projectRoot/ios $ pod install

Creating a new React app fail in Windows 10

I'm trying to create a new ReactJS project by typing on cmd:
create-react-app new_project
But the cmd appear like this for hours and no change:
Creating a new React app in...
My node version: v10.16.3.
My npm version: 6.12.0.
Please help me to solve this problem. Thanks.
Try
npm install npm#latest -g
and run again
Similar problem's here
create-react-app hangs when initializing an app
It seems create-react-app not installed globally properly.
Try this
npm install -g create-react-app
the restart you system.
Now try using the command you used.
create-react-app new_project

error while trying to install react-native -floating-action

when I'm trying to install some package
like:
react-native-floating-action
or:
react-native-action-button
I'm running the
npm i react-native-floating-action --save
and when I run react-native link
i get this error:
PS C:\Projects\projectname> react-native link
rnpm-install info Linking assets to ios project
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property 'pbxprojPath' of null
Please file an issue here: https://github.com/facebook/react-native/issues
Cannot read property 'pbxprojPath' of null
TypeError: Cannot read property 'pbxprojPath' of null
at Object.linkAssetsIOS [as copyAssets] (C:\Projects\projectname\node_modules\react-native\local-cli\link\ios\copyAssets.js:24:41)
at C:\Projects\projectname\node_modules\react-native\local-cli\link\link.js:104:12
at Array.forEach (<anonymous>)
at linkAssets (C:\Projects\projectname\node_modules\react-native\local-cli\link\link.js:94:28)
at C:\Projects\projectname\node_modules\react-native\local-cli\link\link.js:171:30
these are my versions:
react-native-cli: 2.0.1
react-native: 0.57.1
npm --version
6.4.1
expo --version
2.6.14
Expo does not support linked binaries. If you require linked binaries, you must first Eject from Expo to ExpoKit or initialize your project using react-native init MyProjName
Reference
If you know that you'll eventually need to include your own native code, Expo is still a good way to get started. In that case you'll just need to "eject" eventually to create your own native builds. If you do eject, the "Building Projects with Native Code" instructions will be required to continue working on your project.
https://facebook.github.io/react-native/docs/getting-started.html
This worked for me:
npm update
react-native link
Eventually, I found the problem,
I needed to run react-native upgrade, and had a different version of react-native in the package.json from the node_modules
writing ^0.57.8 (current react-native version) on the packge.json:
"react-native": "^0.57.8",
running npm install
setting a name for the project in the package.json:
"name":"somename"
and running
react-native upgrade
react-native link
everything was ok
seems to me that it's always a matter of versions with react-native errors

Can't create WebStorm React project

I'm trying to create a React project in WebStorm 2016.3.1
It's asking me for a create-react-app but I have no idea what that is and I can't find any reference on Google.
What is it and where can I find the value?
You need to install create-react-app npm module, before you use this feature.
npm install -g create-react-app
You can read more about this feature on the official release blog of WebStorm.
Excerpt from the documentation :
Make sure that you have create-react-app installed globally on your computer, for that run npm install -g create-react-app. Then to start your new project, double click on the start task in the npm tasks tool window to run it. That’s it!
I had ie installed create-react-app globally using yarn and webstorm failed to find it. Then I used npm, not to mention globally and its working like a charm.
TL;DRNo need to install anything. Just enter npx create-react-app in the create-react-app field & it should work like a pycharm, I mean charm :)
Side note: npx is pre-bundled with npm since npm version 5.2.0.
I created webStrom react app following this steps.
Download node.js
Open command line console and type "npm install -g create-react-app"
Create react app project from web-storm.
Make sure you provided the correct file path of create-react-app , by default it is
installed in ~\AppData\Roaming\npm\node_modules\create-react-app
use
npm start: to start development server
If you are using asdf or any other tool to manage multiple versions of nodejs, you will need to set up the path to create-react-app manually
I'm on mac, so for me the path was
/Users/<USER>/.asdf/installs/nodejs/12.16.2/.npm/lib/node_modules/create-react-app

Resources