errors while install material-ui - reactjs

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

Related

unable to install react-open-weather (SPA - AEM ) custom component

I was following this documentation To create a custom component(open weather) in SPA and map it to AEM.
I'm following the above documentation to install that component as a npm dependancy using this command 'npm i react-open-weather', but i am getting errors while installing that component, i have tried this command with --force, or --legacy-peer-deps still my problem doesn't get resolved.
I got struck here can anyone help me to get out of this problem.

React Storybook throws error when using npx sb init

I am trying to install Storybook on my project. All I do is initialize the create-react-app and then cd to the current directory. When I enter 'npx sb init' I am getting the following errors:
• Detecting project type. ✓
• Adding Storybook support to your "Create React App" based project
Unable to find versions of #storybook/react using npm
Unable to find versions of #storybook/addon-links using npm
Unable to find versions of #storybook/addon-essentials using npm
Unable to find versions of #storybook/addon-actions using npm
Unable to find versions of #storybook/node-logger using npm
Unable to find versions of #storybook/preset-create-react-app using npm
System
Node: v16.13.0
NPM: 8.1.4
Ubuntu 21.10
Notes
I was able to find a relatable problem here, but unfortunately it doesn't seem logical to init the project on a VM and then copy it locally..
I'm using Ubuntu 20.04.
I had the same issue. The problem was that I had installed node through snap. https://github.com/nodesource/distributions/blob/master/README.md - here is the example how to install on Debian / Ubuntu without using snap.

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

Unable to resolve a dependency in react native maps?

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

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

Resources