Module Not Found Can T Resolve Firebase
У меня есть приложение ionic 3, и по какой-то причине оно не работает ionic cordova run android
Я пытался понизить firebase и @firebase вместе с android между 6.4.0
и 6.3.2
, а также настроить версию стольких библиотек и зависимостей!
Это происходит с проекта песочницы, как хорошо! и я искал его в интернете, но, похоже, это новая ошибка!
Когда вы прочтете журнал ошибок, вы заметите, что он компалирует около Error: Can't resolve '@firebase/auth'
в node_modules/firebase/auth
, таким образом, вот содержание этого файла:
require('@firebase/auth'); // only one line, and when I click on it it's pointing to `node_modules/firebase/node_modules/@firebase/auth/dist/auth.js`
ionic info
выход:
cli packages: (/usr/local/lib/node_modules) @ionic/cli-utils : 1.19.0 ionic (Ionic CLI) : 3.19.0 global packages: cordova (Cordova CLI) : 7.1.0 local packages: @ionic/app-scripts : 3.1.2 Cordova Platforms : android 6.3.0 Ionic Framework : ionic-angular 3.9.2 System: Android SDK Tools : 25.2.5 ios-deploy : 1.9.2 ios-sim : 6.1.2 Node : v8.9.1 npm : 5.2.0 OS : macOS High Sierra Xcode : Xcode 9.1 Build version 9B55 Environment Variables:
точное сообщение об ошибке выглядит следующим образом:
[21:34:40] copy finished in 6.73 s Error: ./node_modules/firebase/auth/index.js Module not found: Error: Can't resolve '@firebase/auth' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/auth' resolve '@firebase/auth' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/auth' Parsed request is a module using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./auth) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./auth) resolve as module looking for modules in /Users/Mike/Code/ionic/foo-bar/node_modules using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules/@firebase/auth) no extension Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.json doesn't exist as directory /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth doesn't exist [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.ts] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.js] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth.json] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/auth] @ ./node_modules/firebase/auth/index.js 17:0-25 @ ./node_modules/angularfire2/auth/auth.module.js @ ./node_modules/angularfire2/auth/public_api.js @ ./node_modules/angularfire2/auth/index.js @ ./src/app/app.module.ts @ ./src/app/main.ts,./node_modules/firebase/database/index.js Module not found: Error: Can't resolve '@firebase/database' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/database' resolve '@firebase/database' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/database' Parsed request is a module using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./database) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./database) resolve as module looking for modules in /Users/Mike/Code/ionic/foo-bar/node_modules using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules/@firebase/database) no extension Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.json doesn't exist as directory /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database doesn't exist [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.ts] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.js] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database.json] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/database] @ ./node_modules/firebase/database/index.js 17:17-46 @ ./node_modules/firebase/index.js @ ./src/providers/imgHandler.ts @ ./src/app/app.module.ts @ ./src/app/main.ts,./node_modules/firebase/firestore/index.js Module not found: Error: Can't resolve '@firebase/firestore' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/firestore' resolve '@firebase/firestore' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/firestore' Parsed request is a module using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./firestore) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./firestore) resolve as module looking for modules in /Users/Mike/Code/ionic/foo-bar/node_modules using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules/@firebase/firestore) no extension Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.json doesn't exist as directory /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore doesn't exist [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.ts] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.js] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore.json] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/firestore] @ ./node_modules/firebase/firestore/index.js 17:0-30 @ ./node_modules/angularfire2/firestore/firestore.js @ ./node_modules/angularfire2/firestore/public_api.js @ ./node_modules/angularfire2/firestore/index.js @ ./src/app/app.module.ts @ ./src/app/main.ts,./node_modules/firebase/messaging/index.js Module not found: Error: Can't resolve '@firebase/messaging' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/messaging' resolve '@firebase/messaging' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/messaging' Parsed request is a module using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./messaging) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./messaging) resolve as module looking for modules in /Users/Mike/Code/ionic/foo-bar/node_modules using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules/@firebase/messaging) no extension Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.json doesn't exist as directory /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging doesn't exist [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.ts] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.js] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging.json] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/messaging] @ ./node_modules/firebase/messaging/index.js 17:0-30 @ ./node_modules/firebase/index.js @ ./src/providers/imgHandler.ts @ ./src/app/app.module.ts @ ./src/app/main.ts,./node_modules/firebase/storage/index.js Module not found: Error: Can't resolve '@firebase/storage' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/storage' resolve '@firebase/storage' in '/Users/Mike/Code/ionic/foo-bar/node_modules/firebase/storage' Parsed request is a module using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./storage) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/node_modules/firebase/package.json (relative path: ./storage) resolve as module looking for modules in /Users/Mike/Code/ionic/foo-bar/node_modules using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) Field 'browser' doesn't contain a valid alias configuration after using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules) using description file: /Users/Mike/Code/ionic/foo-bar/package.json (relative path: ./node_modules/@firebase/storage) no extension Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage doesn't exist .ts Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.ts doesn't exist .js Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.js doesn't exist .json Field 'browser' doesn't contain a valid alias configuration /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.json doesn't exist as directory /Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage doesn't exist [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.ts] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.js] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage.json] [/Users/Mike/Code/ionic/foo-bar/node_modules/@firebase/storage] @ ./node_modules/firebase/storage/index.js 17:0-28 @ ./node_modules/firebase/index.js @ ./src/providers/imgHandler.ts @ ./src/app/app.module.ts @ ./src/app/main.ts at new BuildError (/Users/Mike/Code/ionic/foo-bar/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28) at callback (/Users/Mike/Code/ionic/foo-bar/node_modules/@ionic/app-scripts/dist/webpack.js:121:28) at emitRecords.err (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/Compiler.js:269:13) at Compiler.emitRecords (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/Compiler.js:375:38) at emitAssets.err (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/Compiler.js:262:10) at applyPluginsAsyncSeries1.err (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/Compiler.js:368:12) at next (/Users/Mike/Code/ionic/foo-bar/node_modules/tapable/lib/Tapable.js:218:11) at Compiler.compiler.plugin (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/performance/SizeLimitsPlugin.js:99:4) at Compiler.applyPluginsAsyncSeries1 (/Users/Mike/Code/ionic/foo-bar/node_modules/tapable/lib/Tapable.js:222:13) at Compiler.afterEmit (/Users/Mike/Code/ionic/foo-bar/node_modules/webpack/lib/Compiler.js:365:9)
package.json:
{ "name": "foo-bar", "version": "2.0.1", "author": "Optimatec", "homepage": "http://ionicframework.com/", "private": true, "scripts": { "clean": "ionic-app-scripts clean", "build": "ionic-app-scripts build", "lint": "ionic-app-scripts lint", "ionic:build": "ionic-app-scripts build", "ionic:serve": "ionic-app-scripts serve" }, "dependencies": { "@angular/common": "4.4.4", "@angular/compiler": "4.4.4", "@angular/compiler-cli": "4.4.4", "@angular/core": "4.4.4", "@angular/forms": "4.4.4", "@angular/http": "4.4.4", "@angular/platform-browser": "4.4.4", "@angular/platform-browser-dynamic": "4.4.4", "@ionic-native/app-version": "^4.4.2", "@ionic-native/call-number": "4.3.0", "@ionic-native/camera": "4.3.0", "@ionic-native/clipboard": "^4.4.2", "@ionic-native/core": "4.3.0", "@ionic-native/diagnostic": "4.3.0", "@ionic-native/facebook": "4.3.0", "@ionic-native/file": "4.3.0", "@ionic-native/file-chooser": "4.3.0", "@ionic-native/file-path": "4.3.0", "@ionic-native/file-transfer": "^4.4.2", "@ionic-native/firebase": "4.3.0", "@ionic-native/geolocation": "4.3.0", "@ionic-native/google-maps": "4.3.0", "@ionic-native/google-plus": "4.3.0", "@ionic-native/in-app-browser": "4.3.0", "@ionic-native/launch-navigator": "4.3.0", "@ionic-native/onesignal": "4.3.0", "@ionic-native/social-sharing": "4.3.0", "@ionic-native/splash-screen": "4.3.0", "@ionic-native/status-bar": "4.3.0", "@ionic-native/vibration": "4.3.0", "@ionic/storage": "2.1.3", "@ngx-translate/core": "8.0.0", "@ngx-translate/http-loader": "2.0.0", "angular2-moment": "^1.7.0", "angularfire2": "^5.0.0-rc.0", "branch-cordova-sdk": "^2.6.18", "call-number": "^1.0.1", "com.googlemaps.ios": "https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk", "cordova-android": "^6.3.0", "cordova-clipboard": "^1.1.1", "cordova-plugin-actionsheet": "^2.3.3", "cordova-plugin-app-version": "^0.1.9", "cordova-plugin-camera": "^2.4.1", "cordova-plugin-compat": "^1.2.0", "cordova-plugin-device": "^1.1.7", "cordova-plugin-dialogs": "^1.3.4", "cordova-plugin-facebook4": "^1.9.1", "cordova-plugin-file": "^5.0.0", "cordova-plugin-file-transfer": "^1.7.0", "cordova-plugin-filechooser": "^1.0.1", "cordova-plugin-filepath": "^1.1.0", "cordova-plugin-firebase": "^0.1.24", "cordova-plugin-geolocation": "^2.4.3", "cordova-plugin-googlemaps": "^2.1.1", "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git", "cordova-plugin-googleplus": "^5.1.1", "cordova-plugin-inappbrowser": "^1.7.2", "cordova-plugin-splashscreen": "^4.1.0", "cordova-plugin-statusbar": "^2.3.0", "cordova-plugin-vibration": "^2.1.6", "cordova-plugin-whitelist": "^1.3.3", "cordova-plugin-x-socialsharing": "^5.2.1", "cordova.plugins.diagnostic": "^3.7.2", "es6-promise-plugin": "^4.1.0", "firebase": "^4.5.0", "ionic-angular": "^3.7.1", "ionic-img-viewer": "2.7.0", "ionic-plugin-keyboard": "^2.2.1", "ionic2-rating": "^1.2.2", "ionicons": "3.0.0", "moment": "^2.19.2", "onesignal-cordova-plugin": "^2.2.4", "promise-polyfill": "6.1.0", "rxjs": "5.4.3", "sw-toolbox": "3.6.0", "uk.co.workingedge.phonegap.plugin.launchnavigator": "^4.1.0", "zone.js": "0.8.18" }, "devDependencies": { "@ionic/app-scripts": "3.1.2", "typescript": "2.4.0" }, "description": "An Ionic project", "cordova": { "plugins": { "cordova-plugin-x-socialsharing": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-statusbar": {}, "cordova-plugin-whitelist": {}, "ionic-plugin-keyboard": {}, "cordova-plugin-firebase": {}, "call-number": {}, "mx.ferreyra.callnumber": {}, "cordova-plugin-vibration": {}, "cordova-plugin-facebook4": { "APP_ID": "15196419", "APP_NAME": "FooBar" }, "cordova-plugin-camera": {}, "onesignal-cordova-plugin": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-googleplus": { "REVERSED_CLIENT_ID": "com.googleusercontent.app" }, "cordova.plugins.diagnostic": {}, "cordova-plugin-filechooser": {}, "cordova-plugin-filepath": {}, "branch-cordova-sdk": {}, "uk.co.workingedge.phonegap.plugin.launchnavigator": {}, "cordova-clipboard": {}, "cordova-plugin-app-version": {}, "cordova-plugin-file-transfer": {}, "cordova-plugin-googlemaps": { "API_KEY_FOR_ANDROID": "AIzaSyBYJVEVRyo7Az", "API_KEY_FOR_IOS": "AIzaSyCqe2DU", "LOCATION_WHEN_IN_USE_DESCRIPTION": "Show your location on the map", "LOCATION_ALWAYS_USAGE_DESCRIPTION": "Trace your location on the map" }, "cordova-plugin-geolocation": { "GEOLOCATION_USAGE_DESCRIPTION": "To display to you the most close places based on your location" }, "com.googlemaps.ios": {}, "cordova-plugin-file": {} }, "platforms": [ "android" ] } }
cordova firebase cordova-plugins ionic3 angularfire2
После выполнения всех необходимых шагов на firebase.com/docs и обновления моего приложения до более новой версии я все еще не могу запустить deploy it using firebase-tools . $ firebase deploy...
Я пытаюсь развернуть Firebase хостинг моего веб-приложения. В командной строке, когда я набираю firebase deploy , я получаю следующую ошибку. Примечание: firebase deploy - это только один пример....
Переход на firebase 3.0, но он не смог инициализироваться. var firebase = require('firebase'); // Initialize Firebase var config = { apiKey: key, authDomain: .firebaseapp.com, databaseURL:...
альфредоизжр [3:12 PM] Привет нужна помощь, когда я устанавливаю sdk firebase npm install firebase-admin --save их я импортирую на свой сервис import * as admin from firebase-admin; их я пытаюсь...
При использовании firebase-admin на стороне сервера, Мне нужно получить пользовательские данные из firebase authentication. Но я обнаружил, что если я использую токен jwt, который предоставил...
Использование новых функций Firebase Cloud в сочетании с admin sdk. Я хочу использовать функцию admin.auth().createCustomToken(). Вызов этой функции приводит к появлению сообщения об ошибке Error:...
Я использую версию 6.0.0 firebase admin в Dialogflow fulfillments для отправки уведомления fcm. admin.messaging().send({ message: { notification: { title: Portugal vs. Denmark, body: great match! },...
Я работаю в приложении Angular с firebase и застрял, проверяя idToken с firebase SDK в функции cloud. Он начинается, когда я пытаюсь сделать звонок на защищенную конечную точку, пользователь должен...
Я пытаюсь добавить firebase в проект angular 6. npm install firebase angularfire2 --save Этот проект основан на ngx-admin, с некоторыми модификациями. Я нуб, приходящий в angular и typescript. После...
Я создаю приложение react с библиотекой firebase v7.15.5, и когда я импортирую 'firebase/auth',, оно работает нормально, но выдает мне предупреждения в terminal: WARNING in...
Module Not Found Can T Resolve Firebase
Source: https://coderoad.ru/47621934/%D0%B8%D0%BE%D0%BD%D0%BD%D0%B0%D1%8F-%D0%9E%D1%88%D0%B8%D0%B1%D0%BA%D0%B0-3-firebase-node_modules-firebase-auth-index-js