본문 바로가기
  • 소소한 개발자 이야기
Software/알고보면 쓸모있는 코딩스킬

[node.js] npm run serve 오류 vue-cli-service: command not found

by Siwan_Min 2022. 12. 7.
728x90

오픈 소스를 Clone 받아 프로젝트 npm을 구동 하려고 했는데 아래와 같은 상황을 만날 경우가 있다. 

 

문제

minsiwan-ui-MacBookPro:slots minsiwan$ npm run serve

> slots@0.1.0 serve
> vue-cli-service serve

sh: vue-cli-service: command not found

npm run serve 를 구동 했으나, package.json은 설치되어 있음에도 command not found 라고 나온다. 

 

원인

원격 저장소에 있는 오픈소스 프로젝트를 로컬에 Clone 받을 시 초기 설정이 필요하나 그 작업이 이루어 지지 않았기 때문이다. 

 

해결방법

npm ci
npm run serve


minsiwan-ui-MacBookPro:slots minsiwan$ npm run serve

> slots@0.1.0 serve
> vue-cli-service serve

 INFO  Starting development server...
(node:1497) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
 12% building 23/24 modules 1 active ...p/vue-advanced/design/slots/src/main.jsBrowserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`
 98% after emitting CopyPlugin                                                   

 DONE  Compiled successfully in 679ms                                                                                 오전 7:51:52

 
  App running at:
  - Local:   http://localhost:8080/ 
  - Network: http://192.168.0.76:8080/

  Note that the development build is not optimized.
  To create a production build, run npm run build.

 

728x90

댓글