본문 바로가기

ionic framework 아이오닉 프레임워크

ionic 프레임워크 시작하기 / npm install -g ionic 오류

반응형

npm install -g ionic 입력하면 아래와 같은 오류가 뜬다.

PS C:\> npm install -g ionic                                                                                            
npm ERR! code ENOENT 
npm ERR! syscall rename 
npm ERR! path C:\Users\sangn\AppData\Roaming\npm\node_modules\.staging\ionic- 
45d2e677\node_modules\@ionic\cli 
npm ERR! dest C:\Users\sangn\AppData\Roaming\npm\node_modules\.staging\@ionic\cli-cdf64500 
npm ERR! errno -4058 
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\sangn\AppData\Roaming\npm\node_modules\.staging\ionic-45d2e677\node_modules\@ionic\cli' -> 'C:\Users\sangn\AppData\Roaming\npm\node_modules\.staging\@ionic\cli-cdf64500' 
npm ERR! enoent This is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\sangn\AppData\Roaming\npm-cache\_logs\2020-05-19T20_39_13_742Z-debug.log

npm ERR! code ENOENT ===>  동기화에서 문제가 발생하는데 2.0부터는 문제가 많이 해결되었다 함.

npm ERR! syscall rename ===> ?? package-lock.json 을 삭제하고 다시 설치하라함.

npm ERR! path ... ===> 

 

로 왜 오류가 나는지 찾아보자. 오류가 너무 많다...

 

 


이미 ionic이 설치가 되어있어서 그래서 c:\에서 다시 ionic을 재설치하니까 아무 소용이 없었구나...

(내가 실행할 폴더를 만들어서 거기에 node.js 랑 npm 설치한 후에 그 폴더 안에서 npm install -g ionic 을 설정하고 - ionic serve 해서 실행을 시켜야 하는 것이었다.)

우선 새로 ionic 실행할 어플 하나를 생성한다.

cmd 창에 

ionic start firstApp sidemenu

firstApp이라는 어플이 하나 생성되었다. 이제 cd해서 firstApp으로 들어간다. 그 다음에 아래의 명령을 실행한다.

ionic serve

하면 빈 어플하나가 실행이 되는데 내용을 알맞게 바꾸면 된다.

 

아이오닉 프레임워크 링크

https://ionicframework.com/docs/

 

Ionic Framework - Ionic Documentation

Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

ionicframework.com

 

반응형