#環境
Ionic + Angularでアプリ開発をしています。
環境は以下の通りとなります。
ionic info
Ionic: Ionic CLI : 6.9.2 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.1.1 @angular-devkit/build-angular : 0.901.7 @angular-devkit/schematics : 9.1.6 @angular/cli : 9.1.7 @ionic/angular-toolkit : 2.2.0 Capacitor: Capacitor CLI : 2.1.0 @capacitor/core : 2.1.0 Utility: cordova-res (update available: 0.14.0) : 0.6.0 native-run (update available: 1.0.0) : 0.2.8 System: NodeJS : v10.15.1 (/usr/local/bin/node) npm : 6.12.1 OS : macOS Mojave
package.json
は以下の通りです
json
1{ 2 "name": "mapProject", 3 "version": "0.0.1", 4 "author": "Ionic Framework", 5 "homepage": "https://ionicframework.com/", 6 "scripts": { 7 "ng": "ng", 8 "start": "ng serve", 9 "build": "ng build", 10 "test": "ng test", 11 "lint": "ng lint", 12 "e2e": "ng e2e" 13 }, 14 "private": true, 15 "dependencies": { 16 "@angular/common": "^9.1.9", 17 "@angular/core": "^9.1.9", 18 "@angular/fire": "^6.0.0", 19 "@angular/forms": "^9.1.9", 20 "@angular/platform-browser": "^9.1.9", 21 "@angular/platform-browser-dynamic": "^9.1.9", 22 "@angular/router": "^9.1.9", 23 "@capacitor/android": "^2.1.0", 24 "@capacitor/core": "2.1.0", 25 "@capacitor/ios": "^2.1.0", 26 "@ionic-native/core": "^5.0.7", 27 "@ionic-native/splash-screen": "^5.0.0", 28 "@ionic-native/status-bar": "^5.0.0", 29 "@ionic/angular": "^5.0.0", 30 "firebase": "^7.14.5", 31 "rxjs": "~6.5.1", 32 "rxjs-compat": "^6.5.5", 33 "tslib": "^1.10.0", 34 "zone.js": "~0.10.2" 35 }, 36 "devDependencies": { 37 "@angular-devkit/build-angular": "^0.901.7", 38 "@angular/cli": "^9.1.7", 39 "@angular/compiler": "^9.1.9", 40 "@angular/compiler-cli": "^9.1.9", 41 "@angular/language-service": "^9.1.9", 42 "@capacitor/cli": "2.1.0", 43 "@ionic/angular-toolkit": "^2.1.1", 44 "@types/jasmine": "~3.5.0", 45 "@types/jasminewd2": "~2.0.3", 46 "@types/node": "^12.12.42", 47 "codelyzer": "^5.1.2", 48 "jasmine-core": "~3.5.0", 49 "jasmine-spec-reporter": "~4.2.1", 50 "karma": "^5.0.9", 51 "karma-chrome-launcher": "~3.1.0", 52 "karma-coverage-istanbul-reporter": "~2.1.0", 53 "karma-jasmine": "~3.0.1", 54 "karma-jasmine-html-reporter": "^1.4.2", 55 "protractor": "~5.4.3", 56 "ts-node": "~8.3.0", 57 "tslint": "~6.1.0", 58 "typescript": "~3.8.3" 59 }, 60 "description": "An Ionic project" 61}
#起こっている問題
AngularFireか、Angularが原因で困っております。
ionic serve
のコマンドで以下のようなエラーが発生します。。。
ng] ERROR in /Users/gen/node_modules/@angular/fire/angularfire2.js [ng] Module not found: Error: Can't resolve '@angular/common' in '/Users/gen/node_modules/@angular/fire' [ng] ERROR in /Users/gen/node_modules/@angular/fire/angularfire2.js [ng] Module not found: Error: Can't resolve '@angular/core' in '/Users/gen/node_modules/@angular/fire' [ng] ERROR in /Users/gen/node_modules/@angular/fire/firebase.app.module.js [ng] Module not found: Error: Can't resolve '@angular/core' in '/Users/gen/node_modules/@angular/fire' [ng] ERROR in /Users/gen/node_modules/@angular/fire/auth/auth.js [ng] Module not found: Error: Can't resolve '@angular/core' in '/Users/gen/node_modules/@angular/fire/auth' [ng] ERROR in /Users/gen/node_modules/@angular/fire/firebase.app.module.js [ng] Module not found: Error: Can't resolve 'firebase/app' in '/Users/gen/node_modules/@angular/fire
#試したこと
npm install firebase @angular/fire npm update
上記のコマンドを試しましたが、全く変わらずです。。。
#気になる事
/Users/gen/node_modules/
以下のフォルダを確認してみました。
すると、画像のような状態でした。
正直node_modules
以下のフォルダは初めて見ました。
関係あるのかわかりませんが、気になったので、、、
もしこれだけの情報で推測がつく方がいれば、お願いします!
あなたの回答
tips
プレビュー