https://github.com/StephenGrider/UpStarMusic/
I cloned the above git repository and was trying to run it after installing dependcies using npm run start
.There is only connection refused error in electron console and the webpack never compiles until the window is closed and once its closed the webpack compiles successfully.
I don't know react was following a tutorial and this was related to MongoDb and for that the tutor was using a react node template to display the data
but am stuck as I cannot move and tried contacting the tutor but he is not responding and after checking git many had this issue .
Related
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
I just finished the ReactJS.org tutorial and it was functional. Then I added a bunch of comments to explain each block of code, closed down the local server, and went home. When I re-opened it to start tweaking it and trying advanced options, it broke, with several errors (webpack, eslint, child compilation failed...). The only thing that changed was a VS Code update.
The main error seems to be related to webpack, but I don't have a webpack config file, and I'm not using it to my knowledge. I used create-react-app to build the app, and deleted the files in the src/ directory to start from scratch like the tutorial says to do.
Errors: (see image)
When doing npm start, it says 1 ERROR in child compilations... in the terminal
Must use import to load ES module...
Child compilation failed...
Troubleshooting:
I removed and re-inserted ESLint config options in package.json
I tried npm uninstall eslint
Did a git checkout of the previous commit (the finished tutorial) which was functional, but it's broken now
Also did an npm ls for reference (see images)
I have reproduced this problem, but my problem is that I created a project based on create-react-app in the V16.* version of Node, but I ran it with the V12.* version of Node. So when I re-run the 16.* version it will work, hopefully that will help you
Problem:
I am still very new to React and am trying to push my React app onto Github, but I keep running into an error when I deploy it on my console.
Set Up:
I am using Atom on a Windows 10 computer. I created my React app by using the commands, npx create-react-app jordon. I then followed the steps in this youtube tutorial. This is what my package.json looks like after following the tutorial:
I then went through the steps to initialize a github repository. However, after running npm run deploy, I come across an error:
I have tried to rerun the steps in the tutorial time after time, but either receive the same error, or an error that is resolved by uninstalling gh-pages from the folder but leads to the same error. At this point, I have not found any resources that would help me, since most people seem to have successfully ran the npm run deploy command. Any help would be much appreciated!
This question already has answers here:
How to generate sitemap with react router
(2 answers)
Closed 2 years ago.
I am using react-router-sitemap to generate sitemap.xml and successfully generated file in public folder after running npm run sitemap. But I need to update this file whenever I add new URL's to the site without creating build.
I am using python/Django for backend
I followed this blog how to generate sitemap for react website
Is there any way by which I can run npm run sitemap after some conditions
It really depends what the conditions are that you're looking to trigger the command, the blog post you linked actually gives a good way to do this, if you scroll down to the end of the blog post it mentions using a predeploy hook;
"scripts": {
"predeploy": "npm run sitemap"
}
using this predeploy hook will run npm run sitemap before it runs npm run deploy whenever you deploy your application, assuming you deploy your application by running npm run deploy and assuming there's also a deploy script in your package.json
This question already has an answer here:
Yarn test failing - Network request failed
(1 answer)
Closed 5 years ago.
created a react project using create-react-app however when I go to run yarn test to see if the initial tests pass I get
/home/afenwick/Development/road-to-react-learning/node_modules/react-scripts/scripts/test.js:22
throw err;
^
TypeError: Network request failed`
error Command failed with exit code 1.
If I set up a brand new app it works totally fine, have not made any changes to App.test.js, just trying to run the default test. yarn start works fine, spins up my app in the browser.
Have tried deleting node_modules
Also tried npm install instead and npm run tests but that doesnt install my dependencies and then also errors the tests.
OS: Antergos Linux
Github repo: https://github.com/Fenwick17/road-to-react-learning
Stepped through my commits to locate the issue, and appears to be caused in https://github.com/Fenwick17/road-to-react-learning/commit/4b6069181a39861e531b550ebb8689695db042bb so I will work through the changes to rectify.
I also ran into this problem when following the book entitled "The Road to Learn React" and I think that the one causing this error is the part where fetch is called. The book forgot to include an import for fetch which is this one:
import fetch from 'isomorphic-fetch'
Then, it solves my problem like a charm. Hope this help.