ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • "NPM error" after installing "yarn"
    Web/nodeJS 2020. 1. 19. 00:17

    I've been used the "npm" only, but I heard the "yarn" is more convenient.

    So I installed "yarn", to try it in my new node project.

    "yarn" was 👍, but suddenly "npm" didn't work.

    zsh gave me an error "zsh: command not found: npm"

    To solve this problem, I start googgling based on the error message.

    I found few solutions like "Change the zsh setting," "Change the PATH," and so on.

    But those didn’t work for me at all.

    I asked myself when does the matter started, and I got the answer.

    Just before I got error, I installed "yarn." After the install, I couldn’t use "npm."

    So I changed my searching point, from "zsh: command not found: npm" to "npm error after yarn"

    My take away from this experience is "Knowing the situation that caused the error is important."

    Search by error messages is great solution, but it isn’t a only way to solve the problem.


    npm만 쓰다가 yarn을 써보려고 설치를 했는데 그 이후로 npm이 작동을 하지 않았다.

    그걸 모르고 계속 왜 npm이 안되나 하면서 PATH나 zsh 문제인 줄로만 알고 그 쪽을 계속 구글링을 했다.

    그러다가 yarn을 설치한 후 부터 안되었던 게 생각이 나서 

    "npm error after install yarn"으로 검색하니까 해결방법이 바로 떴다.

    npm을 global하게 다시 install하니까 거짓말처럼 잘 됐다.

    'Web > nodeJS' 카테고리의 다른 글

    Socket.io  (0) 2020.01.07
    Realtime Drawing Game 만들기 - Guess my mind  (0) 2020.01.07
    Nodemon 설치  (0) 2020.01.07
    iterm으로 프로젝트 생성  (0) 2020.01.05
    Express Core: Routing  (0) 2019.11.27

    댓글

Designed by Tistory + Edited by Juepark