Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 30, 2021 04:59 pm GMT

Fixing my everyday errors!!

1. How do I kill a process currently using a port on localhost?

npx kill-port 8001
Expected output: Process on port 8001 killed

2. Using import in server.js

Inside package.json add

"type": "module",

3. sh: react-scripts: command not found after running npm start

run npm install or yarn add
stack-overflow

4. axios baseURL

// Set config defaults when creating the instanceconst instance = axios.create({  baseURL: 'https://api.example.com'});

5. Heroku error code = H10

Heroku dynamically sets the PORT, which can be accessed with process.env.PORT

const port = process.env.PORT || 8001;

Original Link: https://dev.to/deek9399/fixing-my-everyday-errors-1bol

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To