использование ионного с пряжей вызывает проблемы с кордовой - PullRequest
0 голосов
/ 19 декабря 2018

Я работаю над проектом Ionic 3.9, где все зависимости управляются с помощью yarn.Это сводит меня с ума, потому что, когда я пытаюсь использовать команды ionic cordova, которые используют npm, я получаю множество ошибок.

Например:

 $ ionic cordova platform add android
> cordova platform add android --save
Using cordova-fetch for cordova-android@7.0.0
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.kohappy.push
    Name: kohappy
    Activity: MainActivity
    Android target: android-26
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0
Android Studio project detected
Android Studio project detected
Installing "cordova-plugin-advanced-http" for android
Failed to install 'cordova-plugin-advanced-http': CordovaError: Failed to fetch plugin cordova-plugin-file@>=2.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN @angular/common@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/core@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/http@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/camera@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/camera@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/core@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/email-composer@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/email-composer@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fcm@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fcm@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/geolocation@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/geolocation@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/http@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/http@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/push@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/push@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/splash-screen@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/status-bar@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/louisro/.npm/_logs/2018-12-19T11_40_55_332Z-debug.log
    at /home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/cordova-lib/src/plugman/fetch.js:161:37
    at _rejected (/home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:864:24)
    at /home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:890:30
    at Promise.when (/home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:1142:31)
    at Promise.promise.promiseDispatch (/home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:808:41)
    at /home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:624:44
    at runSingle (/home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:137:13)
    at flush (/home/louisro/.nvm/versions/node/v8.9.4/lib/node_modules/cordova/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
Failed to fetch plugin cordova-plugin-file@>=2.0.0 via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm WARN @angular/common@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/core@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/forms@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @angular/http@5.2.9 requires a peer of rxjs@^5.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/camera@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/camera@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/core@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/email-composer@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/email-composer@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fcm@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/fcm@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/geolocation@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/geolocation@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/http@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/http@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/push@4.12.0 requires a peer of @ionic-native/core@^4.11.0 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/push@4.12.0 requires a peer of rxjs@^5.5.11 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/splash-screen@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN @ionic-native/status-bar@4.5.3 requires a peer of rxjs@^5.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/common@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/core@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/platform-browser@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angularfire2@5.0.0-rc.12 requires a peer of @angular/platform-browser-dynamic@^6.0.0 but none is installed. You must install peer dependencies yourself.

npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    darwin
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/louisro/.npm/_logs/2018-12-19T11_40_55_332Z-debug.log
[ERROR] An error occurred while running subprocess cordova.

        cordova platform add android --save exited with exit code 1.

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

1 Ответ

0 голосов
/ 10 апреля 2019

Редактировать: Извините, пряжа - это старая дискуссия между сообществами, и она не поддерживается для команд cordova даже вне ионной.

Пожалуйста, обратитесь к этому: https://github.com/apache/cordova-cli/issues/303


Вы пробовалинастроить Ionic config для использования пряжи?

ionic config set -g yarn true

...