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

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

Related

Why am I getting a "Cannot find module './cli-engine'" error and how can I fix it?

I'm new to programming, so please be gentle.
When I use 'npm start' to view my react app in local host it won't compile. I get an error message, 'Cannot find module './cli-engine'. That was not the case until today.
I suppose this file was in node_modules until recently? How can I restore my development environment to normal without breaking anything?
Here's the full error message:
Cannot find module './cli-engine'
Require stack:
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/node_modules/eslint/lib/api.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/getESLint.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/linter.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/index.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/eslint-webpack-plugin/dist/cjs.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/config/webpack.config.js
- /Users/louysgackstetter/Desktop/Portfolio/Dominion/dominion/node_modules/react-scripts/scripts/start.js
UPDATE: npm install did not fix the issue. Or rather, it did, I no longer got the error described above, but I got a different "Cannot find module" error instead. Ultimately I created a completely new react-redux app using the create-react-app command and moved my source code over. Took me 10 minutes, solved the problem like a charm.
You can try npm install, and see if that resolves the problem.
Here is explained everything you need to know about it:
What's the difference between dependencies, devDependencies and peerDependencies in npm package.json file?

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.

Yarn start fails with Unexpected identifier without details

I am trying to start up a react app. After cloning the code from github, running yarn install I ran yarn start and got the following error:
yarn run v1.22.10
$ cross-env HTTPS=true react-scripts start
Unexpected identifier
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The authors of the app don't know what might be wrong (it's working for them). I tried creating another app with create react app and that started up fine for me. I am not sure where to start looking as there is no indication as to where the "unexpected identifier" might be located or what it might be. Any ideas on what I might want to check or try? I am on MacOS Catalina.
I figured it out eventually. I tried running build and it failed on syntax error in one of the .js files (a missing comma). Once that was fixed the start ran too. If the start command returned the same informative error the build did it would have saved me hours :)

Newly created React app crashes on live server

Whenever i create a react app using create-react-app and run npm run start it crashes.
This is the error i am getting in terminal.
Failed to compile ../node_modules/react-dev-utils/webpackHotDevClient.js
Error: [BABEL]/Users/toures/Desktop/REACT/SecondSummit/try1/node_modules/react-dev-utils/webpackHotDevClient.js:
Cannot find module './src/data'
(While processing: "/Users/toures/Desktop/REACT/SecondSummit/try1/node_modules/babel-preset-react-app/dependencies.js$0$9")
Can anyone guide me? Thanks.
In the past I've fixed it by deleting the node_modules folder, then running npm install.

React start npm doesn't work - error event occured

I'm trying to start a new react environment using npx command.
While the npx is working and the directory is formed, when I try to start it won't work (using npm start).
This is the error I'm getting:
Here's a snapshot of the error I'm receiving:
Any idea what I need to do?
I've tried to re-install node.js to its latest version and try to change minor things in the package.js file.

Resources