설치하기 전에 우선 프로젝트 압축풀고
node_modules, package_lock.json, set.txt 삭제한다.
1. node.js 설치하기 https://nodejs.org/en/ path 설정 잘되었는지 확인 꼭!
설치 확인 방법: test.js 파일 생성 후 console.log('hi'); 작성,
cmd로 해당 파일 경로에서 node test.js 실행하여 hi 출력되면 됨.
2. 프로젝트 폴더 위치로 가서 cmd 진행하기
3. npm install
4. ionic serve
<에러 발생 시>
①[ng] ERROR in node_modules/@types/parse/index.d.ts(501,36): error TS1005: ',' expected.
npm install @types/parse@2.4.7
npm install
②CordovaError: Promise rejected with non-error: "xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance\n"
https://developer.apple.com/download/more/?=command%20line%20tools
CordovaError: Promise rejected with non-error: 'xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer dire
This blog post is brought to you by the developer of BitBudget. BitBudget is an automated budgeting app for Android and iOS which syncs with your bank account and helps you avoid overspending. If you’d like to quit living paycheck-to-paycheck and get a b
topherpedersen.blog
③[ng] ERROR in node_modules/@ionic/storage.d.ts(112,9): error TS1086: An accessor cannot be declared in an ambient context.
npm install @ionic/storage@2.2.0
④CordovaError: Promise rejected with non-error: 'Error code 1 for command: xcodebuild with args: ~~
platforms, plugins 폴더 삭제 후 cordova platform add ios 실행. 그리고 cordova prepare 실행
⑤ERROR in src/app/pages/place-add/place-add.ts(41,23): error TS2307: Cannot find module 'exif-js'.
npm install exif-js --save
<global 설치 안되어있을 경우>
1. TypeScript 설치하기
npm install -g typescript
2. AngularCLI 설치하기 angular버전이랑 프로젝트에 있는 버전이랑 같아야 함!
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli
npm install -g @angular/cli@7.3.6 --> 버전을 지정해서 설치할때
3. ionic 설치하기
npm install -g @ionic/cli
4. npm install -g node-sass
5. ionic serve
<iOS 빌드>
UIWebView가 더이상 지원되지 않아 WKWebView를 사용해야 하기 위해서 설정 필요.
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
1. sudo npm install
2. sudo npm install @types/parse@2.4.7
3. sudo npm install @ionic/storage@2.2.0
4. sudo cordova platform add ios@latest
5. sudo cordova prepare
6. sudo ionic cordova build ios --release
7. xcode 실행 - facebook, inappbrowser, UIWebview 관련 모두 삭제
<페이스북 로그인 기능 사용 시>
1. sudo cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="" --variable APP_NAME=""
2. sudo cordova plugin add cordova-plugin-x-socialsharing@latest --save
3. sudo cordova plugin add cordova-plugin-facebook4@latest --save
4. sudo npm install