Ошибка ионной сборки Не удается найти модуль "./scheduler/Action" - PullRequest
0 голосов
/ 19 октября 2018

Итак, я разрабатывал ионное приложение, и когда я его собирал, я получил эту ошибку .Вот полный код изображения.

PS D:\MEGA\proyectos\ionic\6- gag2> ionic cordova build android
> ionic-app-scripts build --target cordova --platform android
[20:45:31]  ionic-app-scripts 3.2.0
[20:45:31]  build dev started ...
[20:45:31]  clean started ...
[20:45:31]  clean finished in 32 ms
[20:45:31]  copy started ...
[20:45:31]  deeplinks started ...
[20:45:31]  deeplinks finished in 32 ms
[20:45:31]  transpile started ...
[20:45:36]  typescript: D:/MEGA/proyectos/ionic/6- gag2/node_modules/rxjs/Scheduler.d.ts, line: 1
            Cannot find module './scheduler/Action'.


       L1:  import { Action } from './scheduler/Action';
       L2:  import { Subscription } from './Subscription';

[20:45:36]  ionic-app-script task: "build"
[20:45:36]  Error: Failed to transpile program
Error: Failed to transpile program
    at new BuildError (D:\MEGA\proyectos\ionic\6- gag2\node_modules\@ionic\app-scripts\dist\util\errors.js:16:28)
    at D:\MEGA\proyectos\ionic\6- gag2\node_modules\@ionic\app-scripts\dist\transpile.js:159:20
    at new Promise (<anonymous>)
    at transpileWorker (D:\MEGA\proyectos\ionic\6- gag2\node_modules\@ionic\app-scripts\dist\transpile.js:107:12)
    at Object.transpile (D:\MEGA\proyectos\ionic\6- gag2\node_modules\@ionic\app-scripts\dist\transpile.js:64:12)
    at D:\MEGA\proyectos\ionic\6- gag2\node_modules\@ionic\app-scripts\dist\build.js:109:82
    at <anonymous>
[ERROR] An error occurred while running subprocess ionic-app-scripts.

        ionic-app-scripts build --target cordova --platform android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

Кажется, что я пропускаю модуль планировщика / действия из моих узлов node_modules.Я искал ответ и получил временное решение, выполнив:

npm install rxjs@^6.0.0 --save

и затем:

npm install --save rxjs-compat

Выполнив эти команды, я смогу построить свое приложение.Но после некоторых сборок ошибка возвращается, и мне нужно повторно выполнить эти 2 команды.

вот журнал с некоторыми предупреждениями, которые я получаю после команд

Я думаю, что проблема связана с недавним обновлением, которое я сделал день назад.Я пытался обновить angular, angularCLI и rxjs, но я думаю, что сделал что-то не так.

Вот файл package.json моего приложения с версиями зависимостей

{
  "name": "gag2",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/camera": "^4.16.0",
    "@ionic-native/core": "~4.15.0",
    "@ionic-native/image-picker": "^4.16.0",
    "@ionic-native/splash-screen": "~4.15.0",
    "@ionic-native/status-bar": "~4.15.0",
    "@ionic/pro": "2.0.3",
    "@ionic/storage": "2.2.0",
    "angularfire2": "^5.0.2",
    "cordova-android": "7.1.1",
    "cordova-plugin-camera": "4.0.3",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.2.0",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-telerik-imagepicker": "2.2.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "firebase": "^5.5.5",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "promise-polyfill": "^8.1.0",
    "rxjs": "^6.0.0",
    "rxjs-compat": "^6.3.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-camera": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-telerik-imagepicker": {
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message"
      }
    },
    "platforms": [
      "android"
    ]
  }
}

Я хотел бы знать, как решить проблему с модулем.Я думаю, что мне нужно правильно обновить свои angular и rxjs или установить некоторые угловые и rxjs зависимости, но я просто не знаю, с чего начать и не хочу больше портить мое приложение.

Спасибо за преимущество и извините, если ясделал что-то не так, мой первый вопрос здесь.

1 Ответ

0 голосов
/ 20 октября 2018

После всего этого дня, работая над решением, я восстановил правильное угловое и cli до последней версии

npm install -g @angular/cli@latest

и после этого выполнил эту команду тоже

npm i rxjs@6 rxjs-compat@6 promise-polyfill --save

Это сделалопроблема, прежде чем исчезнуть.

...