installed some dependencies, but now npm start doesn't work - reactjs

I have a react app that I created with npx create-react-app. I have been workin on this app for a few weeks and decided to try to add a backend. I installed mongoose, express, and nodemon, and I can see them in my dependencies, but now when I use npm start, it opens up my browser and sends me to localhost:3000 but the app doesn't load. just an error saying this site cant be reached, local host refused to connect. Can anyone help me figure out how to get my app properly running again?

Try to delete node modules and install dependencies again similarly you can use npm ci will do the same.

Related

Cannot read property 'setTitle' of null, js engine: hermes

I am getting the following error
while running my React native app.
Things I already tried:
devScripts/set-me-up.sh
deleting node_modules and installing them again
restarting server by reseting cache - npm start -- --reset-cache
but no success yet, any help would be great.
We have to restart with the command react-native run-android .It worked for me,there is no need to removing node modules or cache

Django and React - npm run watch/build very slow

I'm trying to make a django/drf and react project but it takes 15+ seconds for npm run build to finish. What are my options here? It's not feasible to wait that long after every change I make to the front end. Should I keep the react and django parts separate till the end?
I followed these instructions since I'm new to npm:
https://medium.com/how-to-react/use-npm-watch-to-auto-build-your-reactjs-app-6ed0e5d6cb00
If you need a development setup with React & Django, you can :
do npm run start to open your create-react-app project in development
add "proxy": "localhost:8000" in your package.json so that AJAX requests from React are forwarded to Django
make sure Django is running on port 8000 with ./manage.py runserver
The npm run build is only needed to deploy usually.

Application created using create-react-app not working properly after cloning from github

So I pushed the application I created using create-react-app to github in an organisation repo.After cloning it
I ran npm initnpm installand then ran npm start. But when the server loaded
it showed localhost:3000/organisation-name/repo-name with one letter less from the repo-name(for example,if repo-name was newapp it was like localhost:3000/organisation-name/newap) and also the program is not working.I also tried at localhost:3000 but it is not working.

Trouble Cloning and Running a React Project

I am a beginner and want to run a React project on my local machine. I cloned the project and cd into it and then run npm install. Then, I installed the dependencies using yarn install. Finally, I run npm start, but what shows up in my browser is the React logo and a message saying Edit src/App.js and save to reload.
What am I doing wrong?
The only wrong thing is that you ran yarn install after npm install, that two commands do the same thing.
That react logo and message is the app running, open App.js in an editor a try changing the text to see how it updates on the browser.

How can I run my bower-angular project?

Hi everyone I know its simple question but I am new the angular development.
I have angular projects but I cant run.
I know npm using on console, I tried many times npm run, npm instal on my main directory.
So, how can I run my angular project on the console?
If the project is using Angular Seed or is similarly configured, you can use
npm start
to install dependencies and start a running http-server on port 8080 (by default).
If you project has a README or package.json file, it might give more clues.
Otherwise you can just serve up the application with http-server:
npm install http-server
http-server .
Asume you are using NodeJS as a server side, try node [your-application-main-js-file.js]. For example node index.js. But it depends on what back end environment are you using. Angular is just a front end library/ framework. It should be tested on browser not in your console.

Resources