#javascript #node.js #angular #cordova #ionic-framework
#javascript #node.js #angular #кордова #ionic-framework
Вопрос:
я прохожу онлайн-курс по ionic и cordova и столкнулся с некоторой ошибкой при попытке что-либо сделать с cordova.
Мой репозиторий github находится здесь
ошибка приведена ниже
C:UsersThe_vvDocumentsIonic And CordavaconFusion>ionic cordova plugin add de.appplant.cordova.plugin.local-notification
> cordova plugin add de.appplant.cordova.plugin.local-notification --save
C:UsersThe_vvAppDataRoamingnpmnode_modulescordovanode_modulesfs-extralibmkdirsmake-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:UsersThe_vvAppDataRoamingnpmnode_modulescordovanode_modulesfs-extralibmkdirsindex.js:3:44)
[ERROR] An error occurred while running cordova plugin add de.appplant.cordova.plugin.local-notification --save (exit
code 1).
Я не знаю, откуда берется эта ошибка.
Мои зависимости от пакетов приведены ниже
"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": "^7.2.16",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "4.20.0",
"@ionic-native/splash-screen": "4.20.0",
"@ionic-native/status-bar": "4.20.0",
"@ionic/storage": "2.2.0",
"ionic-angular": "3.9.9",
"ionicons": "3.0.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.4",
"typescript": "2.6.2"
}
Комментарии:
1. Какую версию Node вы используете? Похоже, требуется v12. github.com/ionic-team/native-run/issues/129
2. @BernardinoFrola окей, спасибо, братан, дай мне попробовать