React new project does not re compile on save - reactjs

I've created a new react app using create-react-app. running npm start compile the app and opens the hello react page on localhost://3000, but any change to the project and saving nothing happens.
in the chrome console there is the following error:
Error handling response: Error: Failed to construct 'WebSocket': The URL 'ws/ws' is invalid.
at init (chrome-extension://fiegdmejfepffgpnejdinekhfieaogmj/reload.js:22:18)
at chrome-extension://fiegdmejfepffgpnejdinekhfieaogmj/reload.js:65:13
I'm using Visual studio on Macbook
npm version 6.14.8
node version 14.15.1
react version 17.0.1
(Angular cli project re-compile without a problem)

Deleting the app and running create-react-app again solved the problem.
The initial screen looks different though - so maybe it was a version compatibility issue.

Related

how to get the tar.gz file from react err code E410

I am trying to reinstall an old project from react but am getting weird errors that I don't understand. I tried to change the version of react to newer but didn't work. I am currently using npm 8.11.0 and node v16.15.1

React native Found errors while update expo sdk 42 to 45.Also setup new environment on react native all packages are exist but still giving errors

We have issue found during installing a new expo app whenever we update newer version of expo app from play store our development related things not working so we have updated it with expo sdk 45 but it giving error still so we have set a new environment and trying to solve this after set new environment it still giving errors like below
ERROR Error: Requiring module "node_modules\react-native-reanimated\src\Animated.js", which threw an exception: Error: Reanimated 2 failed to create a worklet, maybe you forgot to add Reanimated's babel plugin?
ERROR Invariant Violation: "main" has not been registered. This can happen if:
Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
A module failed to load due to an error and AppRegistry.registerComponent wasn't called.
I don't think this is a fix for everyone, but try:
yarn global add expo-cli
(Mine upgraded when I do this)
yarn install
(To rebuild the package)
expo --version
Then use the package version on the package.json
"expo-cli": "5.4.12",
expo start
Give it a go, you might be lucky...

Why am I getting "Minified React error #31" after creating a new Gatsby project?

I've tried installing gatsby-cli on my machine and created a new project, but after I generate it and try to serve it, I get Minified React error #31. These are the steps I've followed:
npm i -g gatsby-cli
And got many vulnerability issues I can't recover. I think it had to do with hapi. Then:
$ gatsby new my-project
$ cd my-project
$ gatsby serve
Then I get
failed We've encountered an error: Minified React error #31; visit
https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=Error%3A%20ENOENT%3A%20no%20such%20file%20or%20directory%2C%20open%20'%
2FUsers%2Fwayoshi%2FDev%2Flegionhack-home%2F.cache%2Fmatch-paths.json'&args[]= for the full message or use the non-minified dev
environment for full errors and additional helpful warnings.
Would this be a known common error?
Here's my enviroment info:
macOS 10.14 Mojave
node v12.22
npm v7.21
gatsby develop runs the development server. If you want to run a production build you need gatsby build to build the app and then gatsby serve to run the production build.

How do I fix this ts-toolbelt TypeScript TypeError on Vercel deployment for a Next.js app?

In my portfolio app, I'm trying to merge a PR into the main branch, which contains code to implement React Query. The app works fine on development but when I try to deploy it, Vercel gives me the error above that apparently occurs when they try to build my app.
I tried installing ts-toolbelt as a dependency but it doesn't seem to work.
Here's the project's repo and precisely to the failing PR (You wont' get access to the vercel deployment details as it's my account, but every error that appears is shown in the picture above)
Same thing happened to me and after some research looks like the ts-toolbar version that comes in the React-Query package is not compatible with the Typescript version my React app is using.
To fix it I added a resolutions field on the package.json to force the ts-toolbelt dependency to a compatible version, like so:
"resolutions": {
"ts-toolbelt": "6.15.5"
}
6.15.5 being the ts-toolbelt version compatible with my Typescript version (3.8.3)
Then running yarn install solved the issue for me.

React Native "The expo SDK requires Expo to run. .... this code is not running on Expo."

I am coding with React Native. I don't see that when I first create react-native app for check running. When I implements my code see that. My purpose is generate apk.
app.json
build.gradle
index.js (index.android.json)
App package.json
Solved
Result: I solved my problem with npm install. I would like say many month after.
If anyone's getting this error after upgrading Expo, try restarting your simulator - that fixed it for me.
Here is my experience if someone using expo sees those error message.
I accidentally installed expo manually in my project which was version 29.0.0.
I was using version 28.0.0 of expo sdk, so it may have crashed inside.
What I did:
manually upgrade sdkVersion of app.json to 29.0.0.
change sdk version to 29.0.0 for react-native.
Had exactly the same error - fresh machine, fresh npm, only one version of expo installed.
Turns out, expo requires you to build it as an app before it can send it to the expo app properly (at least on Android). This is easiest done by:
Adding an "android" section to app.json, with the contents "package": "uk.co.yourcompany.yourpackagename" (this is required by android packages. It can be complete garbage, but should follow that format - a backwards domain name)
running expo build:android and following the instructions to sign up to expo's servers and build the app
then restarting expo start
Not sure if this is documented anywhere though, so may be a new thing?
Another thing to try is to move your node_modules folder away (or maybe delete it, up to you) and re-run npm install
According to the official tutorial: https://facebook.github.io/react-native/blog/2017/03/13/introducing-create-react-native-app.html
If you want to use expo in your application, you must create it in the following way
npm i -g create-react-native-app
create-react-native-app my-project
cd my-project
npm start
This will start the React Native packager and print a QR code. Open it in the Expo app to load your JavaScript.
as I see your code has files that are not necessary, such as build.gradle and index.js, the structure that create-react-native-app creates is different and easier to use
I was getting the same error after updating the expo-cli to version 3.0.6.
By looking at my package.json I noticed the expo-cli version installed on my computer is not the same as package.json. so I changed it to "expo-cli": "^3.0.6" and ran npm install || yarn, then the error disappeared!

Resources