DEV Community

Deeksha
Deeksha

Posted on • Edited on

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",

Enter fullscreen mode Exit fullscreen mode

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'
});
Enter fullscreen mode Exit fullscreen mode

5. Heroku error code = H10

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

const port = process.env.PORT || 8001;
Enter fullscreen mode Exit fullscreen mode

6. If we get "Failed to load config "react-app" to extend from"

yarn add eslint-config-react-app
💡dev.to

7. Installing npm

sudo apt-get install npm

8. Installing n

sudo npm install n -g

9. Installing Node LTS version

sudo n lts

10. Checking node version

node --version

10. Installing java version 11

sudo apt install openjdk-11-jre-headless

11. Installing vs code

11.1.sudo apt install wget -y
11.2wget -O vscode.deb 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64'

12. Installing Storybook

npx sb init

13. Clone a specific branch

git clone -b <branchname> <remote-repo-url>

💡 https://www.freecodecamp.org/news/git-clone-branch-how-to-clone-a-specific-branch/

Top comments (0)