Yarn start fails with Unexpected identifier without details - reactjs

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 :)

Related

Why is my react-scripts build throwing an error with the SourceMapConsumer?

I am building an app in Ionic/react, and up until this point it has functioned normally. I ran into an error with the FFI architecture in Ruby, and ran a brew install ruby, exported the path, and reinstalled cocoapods with brew. Since then, my react-scripts build has failed every time with this error message:
You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer
I have done nothing else that would have affected it, and I am struggling finding any relevant information. Any advice or help would be greatly appreciated as to how I can resolve this issue

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

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.

npm start errors - React.js

I am trying to run a server so I can start coding my website. However, I run "npm start" I have been greeted with errors. The steps to fixing this error are laid out, however, for step three I do not see babel-loader within my package.json. In addition, I am not sure if the npm ERR!(s) I get on the bottom are caused because of the issue on top or another issue in itself.
package.json
"runs" npm ls babel-loader
It looks like you have globally installed babel-loader#8.0.2. See #6, it points to the exact case you have.
Remove it from your home directory and that should fix it.

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