Ionic 4 beta 13 - пакеты удаляются при запуске браузера ionic cordova - PullRequest
0 голосов
/ 19 октября 2018

Чтобы запустить мое приложение в браузере (чтобы оно имело некоторые нативные функции), мне нужно сделать:

> ionic cordova prepare browser
> ionic cordova run browser -l

Проблема в том, что когда я пытаюсь run browser, эти пакетыудаляются:

"rxjs": "6.3.3"
"core-js": "^2.5.3"

И, конечно, я получаю следующую ошибку:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc@1.13.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc@1.13.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

...

> ng run app:ionic-cordova-serve --host=0.0.0.0 --port=8100 --platform=browser
[ng] internal/modules/cjs/loader.js:583
[ng]     throw err;
[ng]     ^
[ng] Error: Cannot find module 'rxjs'
[ng]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng]     at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng]     at Module.require (internal/modules/cjs/loader.js:637:17)
[ng]     at require (internal/modules/cjs/helpers.js:20:18)
[ng]     at Object.<anonymous> (app-folder\node_modules\@angular\cli\node_modules\@angular-devkit\core\src\workspace\workspace.js:10:16)
[ng]     at Module._compile (internal/modules/cjs/loader.js:689:30)
[ng]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
[ng]     at Module.load (internal/modules/cjs/loader.js:599:32)
[ng]     at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
[ng]     at Function.Module._load (internal/modules/cjs/loader.js:530:3)

[ERROR] ng has unexpectedly closed (exit code 1).

        The Ionic CLI will exit. Please check any output above for error details.

Когда я запускаю ionic info, я тоже получаю ошибку:

> ionic info
[ERROR] Error loading @ionic/angular-toolkit package.json: Error: Cannot find module '@ionic/angular-toolkit/package'
√ Gathering environment info - done!

Ionic:

   ionic (Ionic CLI)             : 4.2.1 (C:\Users\Eliya\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.13
   @angular-devkit/build-angular : 0.7.5
   @angular-devkit/schematics    : 0.7.5
   @angular/cli                  : 7.0.1
   @ionic/angular-toolkit        : not installed

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : none
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, (and 6 other plugins)

System:

   Android SDK Tools : 26.1.1 (E:\android-sdk)
   NodeJS            : v10.11.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

Это мои package.json отряды:

"dependencies": {
    "@angular/common": "~7.0.0",
    "@angular/core": "~7.0.0",
    "@angular/fire": "^5.0.0",
    "@angular/forms": "~7.0.0",
    "@angular/http": "~7.0.0",
    "@angular/platform-browser": "~7.0.0",
    "@angular/platform-browser-dynamic": "~7.0.0",
    "@angular/router": "~7.0.0",
    "@ionic-native/core": "^5.0.0-beta.21",
    "@ionic-native/google-maps": "^5.0.0-beta.23",
    "@ionic-native/social-sharing": "^5.0.0-beta.21",
    "@ionic-native/splash-screen": "5.0.0-beta.21",
    "@ionic-native/status-bar": "5.0.0-beta.21",
    "@ionic/angular": "^4.0.0-beta.13",
    "@ionic/pro": "2.0.3",
    "@ngx-translate/core": "^10.0.2",
    "@ngx-translate/http-loader": "^3.0.1",
    "@ngxs/devtools-plugin": "^3.2.0",
    "@ngxs/form-plugin": "^3.2.0",
    "@ngxs/router-plugin": "^3.2.0",
    "@ngxs/store": "^3.2.0",
    "cordova-browser": "5.0.4",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps",
    "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-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "^5.4.1",
    "core-js": "^2.5.3",
    "es6-promise-plugin": "^4.2.2",
    "firebase": "^5.5.0",
    "libphonenumber-js": "^1.5.1",
    "rxjs": "6.3.3",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.7.2",
    "@angular-devkit/build-angular": "~0.7.2",
    "@angular-devkit/core": "~0.7.2",
    "@angular-devkit/schematics": "~0.7.2",
    "@angular/cli": "~7.0.1",
    "@angular/compiler": "~7.0.0",
    "@angular/compiler-cli": "~7.0.0",
    "@angular/language-service": "~7.0.0",
    "@ionic/ng-toolkit": "^1.0.0",
    "@ionic/schematics-angular": "^1.0.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~10.9.2",
    "codelyzer": "~4.4.2",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~3.1.3"
  }
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...