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: rea…


This content originally appeared on DEV Community and was authored by Deeksha

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 instance
const 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;


This content originally appeared on DEV Community and was authored by Deeksha


Print Share Comment Cite Upload Translate Updates
APA

Deeksha | Sciencx (2021-10-30T16:59:33+00:00) Fixing my everyday errors!!. Retrieved from https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/

MLA
" » Fixing my everyday errors!!." Deeksha | Sciencx - Saturday October 30, 2021, https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/
HARVARD
Deeksha | Sciencx Saturday October 30, 2021 » Fixing my everyday errors!!., viewed ,<https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/>
VANCOUVER
Deeksha | Sciencx - » Fixing my everyday errors!!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/
CHICAGO
" » Fixing my everyday errors!!." Deeksha | Sciencx - Accessed . https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/
IEEE
" » Fixing my everyday errors!!." Deeksha | Sciencx [Online]. Available: https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/. [Accessed: ]
rf:citation
» Fixing my everyday errors!! | Deeksha | Sciencx | https://www.scien.cx/2021/10/30/fixing-my-everyday-errors/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.