Не удается найти модуль '@ angular / core' + ionic 3 - PullRequest
0 голосов
/ 27 апреля 2018

угловой / сердечник на самом деле в нужном месте. Это первый раз, когда я сталкиваюсь с этой проблемой. что делать в этом случае?

У меня начались проблемы с интеграцией FCM (Firebase Cloud Messaging)

это мой package.json

добавлено "angularfire2": "^5.0.0-rc.6.0", та же ошибка: не может скопировать этот ионный выход

enter image description here

Итак, я понизил

от:

 "angularfire2": "^5.0.0-rc.6.0"

до:

"angularfire2": "5.0.0-rc.3",

И,

от:

"firebase": "^4.13.1",

до:

  "firebase": "^4.6.0",

=============================================== =======

{
  "name": "authNotificationTest",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "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/animations": "5.2.10",
    "@angular/common": "5.2.10",
    "@angular/compiler": "5.2.10",
    "@angular/compiler-cli": "5.2.10",
    "@angular/core": "5.2.10",
    "@angular/forms": "5.2.10",
    "@angular/http": "5.2.10",
    "@angular/platform-browser": "5.2.10",
    "@angular/platform-browser-dynamic": "5.2.10",
    "@ionic-native/core": "4.7.0",
    "@ionic-native/fcm": "^4.7.0",
    "@ionic-native/firebase": "^4.7.0",
    "@ionic-native/splash-screen": "4.7.0",
    "@ionic-native/status-bar": "4.7.0",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.6.0",
    "cordova-browser": "5.0.3",
    "cordova-ios": "4.5.4",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-fcm-plus": "git+https://github.com/guyromb/cordova-plugin-fcm-plus.git",
    "cordova-plugin-firebase": "^1.0.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.2.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "firebase": "^4.13.1",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.10",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.9",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-fcm": {},
      "cordova-plugin-firebase": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    }
  }
}

это моя ионная информация :

пакеты cli: (/ usr / local / lib / node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

глобальные пакеты:

cordova (Cordova CLI) : 8.0.0

местные пакеты:

@ionic/app-scripts : 3.1.9
Cordova Platforms  : browser 5.0.3 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

Система:

Node  : v9.11.1
npm   : 5.6.0
OS    : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145

Переменные среды:

ANDROID_HOME : not set

Разное:

backend : pro

журнал ошибок:

когда я запускаю браузер запускает ионный шнур Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. vendor.js Failed to load resource: the server responded with a status of 404 (Not Found) main.js Failed to load resource: the server responded with a status of 404 (Not Found) vendor.js Failed to load resource: the server responded with a status of 404 (Not Found) (index):1 Refused to execute script from 'http://localhost:8100/build/vendor.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. main.js Failed to load resource: the server responded with a status of 404 (Not Found) (index):1 Refused to execute script from 'http://localhost:8100/build/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. (index):1 Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. когда я запускаю ионная подача

и это из консоли:

Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
main.js Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
vendor.js Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to execute script from 'http://localhost:8100/build/vendor.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
main.js Failed to load resource: the server responded with a status of 404 (Not Found)
(index):1 Refused to execute script from 'http://localhost:8100/build/main.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
(index):1 Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

1 Ответ

0 голосов
/ 28 апреля 2018

Благодаря комментарию Сураджа Рао, здесь вы можете найти решение этой проблемы: «FirebaseApp не реализован правильно» как на скриншоте ниже

enter image description here

Пожалуйста, обратитесь к этой теме для получения более подробной информации: github.com / angular / angularfire2 / Issues / 1385

Откат к "firebase": "4.8.0" помог выше решить проблему

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...