How to fix problem with axios version 0.18.0 - reactjs

Axios was running fine but today I try to run my react app and get the error
./node_modules/axios/lib/helpers/cookies.js Error: EPERM: operation not permitted, read
I have tried uninstalling and installing it again but it still persists.
Any help would be highly valued.

Related

ReactJs Compiling Issue: immer.esm.js is not found

I am creating an reactJS application where I am using react-redux for state management. Few days back it was working fine but now I am getting below error at the time of compilation process:
Failed to compile.
./node_modules/#reduxjs/toolkit/node_modules/immer/dist/immer.esm.js
Error: ENOENT: no such file or directory, open 'root_directory\node_modules\#reduxjs\toolkit\node_modules\immer\dist\immer.esm.js'
I had setup react project using "create-react-app" command. After setting up, I have got few commands that I can use to run application. So, I am getting above issue while running below command:
npm run start
I have also tried to fix this issue after deleting package-lock.json file and then run npm install but still getting same error.
Can someone please guide me what has done wrongly and why this error arrived suddendly.
Thanks in advance

create-react-app error while using yarn 3

I'm using yarn 3.2.0(latest) and node 17.6.0(latest)
As instructed in CRA documentation I ran yarn create react-app myapp. It completed installation and was able to start the app using yarn start. However after making changes to the App , I always get the following error
ERROR
Failed to load config "react-app" to extend from.
Referenced from: D:\myapp\package.json
If I install any packages, I get module not found error like below
ERROR in ./src/App.js 6:0-39
Module not found: Error: Can't resolve 'styled-components' in 'D:\myapp\src'
Anyone know what's going on?
I had a similar issue. And found that the reason why this was happening to me was due to my Antivirus. Try disabling your antivirus on windows if you have one and re-create your project and if that fixes your issue.

React Auth0 Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

I have been following along with this introductory Auth0 React app build-along (link below) and have been running into the same error over and over and can't seem to find any solution. I made this yesterday and it worked 100% until it crashed and gave me this the error message below. I restarted the app many times, rebooted my computer, but nothing fixed it. To check my sanity, I started this project from scratch again but the error message still occurred.
I went to the path where the error was located but couldn't find anything that stood out to me. The problem seems to have started as soon as I installed the npm SDK npm install --save #auth0/auth0-spa-js because before I installed that, the app was working just fine and text was displaying as it should. As soon as you install the SDK, the text disappears.
I even deleted the entire auth0 package in the node_modules folder just to see what would happen and the same error message occurred. Does anyone have some insight into this problem? I am losing my mind and any help would be greatly appreciated!
Code-along link: https://auth0.com/blog/authenticating-your-first-react-app/
Error message: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
Error location: ./node_modules/#auth0/auth0-spa-js/dist/auth0-spa-js.production.esm.js
SDK: npm install --save #auth0/auth0-spa-js (version 1.8.0)

React Native Error - Unable to resolve "./withSafeArea" from "node_modules\react-native-safe-area-view\index.js"

I've just updated my React native version to 0.57 from 0.55.
I'm getting bunch of errors starting from Barbel, fixing errors one by one.
Now I'm encountering
"Unable to resolve "./withSafeArea" from
"node_modules\react-native-safe-area-view\index.js"
Error, and that's all information the console gives.
I tried googling it, seems like I'm the first one encountering this error.
What is the error here?
So far I've tried:
delete node_modules folder and do npm install again.
npm install react-native-safe-area-view.
Both no luck :(

Unexpected error using create-react-native-app:

Attempting to use create-react-native-app and falling at the first hurdle here.
I think the problem is when Yarn attempts to install dependencies:
yarn install v0.27.5
[1/4] Resolving packages...
warning react-native > connect#2.30.2: connect 2.x series is deprecated
error An unexpected error occurred: "https://raw.githubusercontent.com/expo/node-websql/e364fa65146a9e2157a19e5c719e7702c2b6b87a/package.json: connect ETIMEDOUT 90.207.238.183:443".
info If you think this is a bug, please open a bug report with the information provided in "D:\\users\\jamie\\WebstormProjects\\hang\\hang-app\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Failed to install
What's odd is that I ran create-react-native-app on this machine last week to test it out and everything was fine.
Does anyone have any idea about what might be going on here?
The error message says towards the end of the 4th line: connect ETIMEDOUT, which I assume means that Yarn timed out while downloaded that package.json file.
I just tried pasting the URL in my browser and it loaded, so if you try again it might just work!

Resources