Updating create-react-app app, but cannot find react-scripts in package.json - reactjs

The title says it all.
To update my app, which was made with create-react-app, I have to update react-scripts. But, I cannot find this in my package.json. I've even tried installing it manually even though it was not there in the first place and should have been. No luck. Any ideas?

can you upload s screenshot what is the message they show you once you run it ?

Related

I am having weird issues with "#sveltejs/kit": "^1.5.0" but not 1.0.0. Is there any way to tell what might be causing these?

I have a SvelteKit app with package.json showing "#sveltejs/kit": "^1.0.0" and it uses netlify functions to interface with mongodb and everything works fine.
I then installed, in another folder, npm create svelte#latest app and it shows "#sveltejs/kit": "^1.5.0". Everything else the same. Copied over src/static/netlify folders, installed Netlify adapter, set up netlify.toml file, .env file. Installed same version dependencies.
Under 1.5, I get several weird problems like it wont update a record or it has an issue with a {#each loop or duplicate keys. Not just one issue. Several. I change package.json entry to "#sveltejs/kit": "^1.0.0" and npm i and all the problems disappear so its definitely 1.5. I updated Node. No difference. I updated axios and mongodb and same issue.
Is there any way to find out what changes took place from 1.0 to 1.5 to try to figure this out? I would like to use the latest SvelteKit version but can't with these errors.

Ant Design Cannot find module 'rc-textarea'

I just created an Umi Ant Design Pro project but when i run my project (yarn start),i am getting the following error:
Steps taken to resolve this issue:
1:installed rc-textarea:
yarn add rc-textarea
2:stopped my server and ran yarn again in my terminal
3:then ran yarn start to start my server and still got the same error although my terminal this time stopped displaying the error i keep getting in my browser as seen below:
Step4:I then did some Research and came across this link
Git Memory Blog
But the path : ./node_modules/antd/es/input/TextArea.js does not exist in my project.
I also found a github link with a similar issue:
GithubIssue
Other solutions did not work so i tried wbcs's solution:
yarn cache clean
yarn install
But the error is still eminent.
My inspection window indicates that this is a possible webpack issue:
How do i resolve this?
Try removing .umi and node_modules folders, and then start this project again.

React: Module parse failed

I finished setting up node v13.14.0 on my windows 7 laptop then did "npm react-create-app name". After done downloading I was greeted with this error...
Image of my error
I tried searching it on stackoverflow there was a solution about webpack.config.js but I couldn't find it on my folder section.
vscode-folder-structure
Any idea, should reinstall ?
I got around this by creating a new user in windows (I found the solution on github comments somewhere ), then logged in as that user and installed "npx create-react-app app-name" and it worked somehow ¯_(ツ)_/¯.
enter image description here
If you are installing then use npm i create-react-app. If you are trying to creating react app then use npx create-react-app appname. If you have another issue then please elaborate on that issues.

npm start in React app opens different url unpredictably

Tried to run npm start on a project I hadn't looked at in a couple weeks and when I did it opens up localhost:3000/myname/partofmyprojectname instead of just localhost:3000/
When I go to localhost:3000/ there's an error in my terminal
Really confusing because it worked last time I tried it and I didn't change anything I don't think.
As I was making this question I found the solution from this post:
In my package.json, "homepage"'s value was the path to the readme in the github repo: "https://github.com/myname/my-app-frontend#readme" (don't know how that happened). I just changed that to '/'.
I'm thinking maybe my version of react-scripts updated and npm start was deferring to the homepage key in the package.json but not totally sure.

Error: Cannot read property 'UIAppFonts' of null

When running react-native link it gives this error,
It says,
rnpm-install ERR! It seems something went wrong while linking. Error: Cannot read property 'UIAppFonts' of null
I had this exact same problem. I had accidentally deleted by Info.plist file in my ios directory. Restoring it, fixed my issue.
I had same issue not quite long, running react-native links will give you error.
If you are using yarn simply run:
yarn remove react-native
yarn add react-native
Then run react-native link
This fixed it for me.
I had this problem and in my case it was because I had renamed the project but forgotten to update newname in a few folders and files.
In case anyone runs across this, this is how I fixed the react-native linking issue w/ UIAppFonts:
# Regenerates ios files
react-native upgrade
# Works now
react-native link
Basically, it's pretty similar to the answer that Matt posts above, except I didn't know how to restore it.

Resources