PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

[Angular] Angular 10 support? #249

Closed relez closed 4 years ago

relez commented 4 years ago

I am updating my app to Angular 10 and seems like there are some issues using @proplugins/nativescript-drop-down version 8.0.0,

ERROR in ../node_modules/@proplugins/nativescript-drop-down/dist/angular/drop-down-model.directive.js
Module not found: Error: Can't resolve '@nativescript/angular/forms/value-accessors/base-value-accessor' in '/Users/relvis/Projects/NSProjects/FloormastersMobile/node_modules/@proplugins/nativescript-drop-down/dist/angular'
 @ ../node_modules/@proplugins/nativescript-drop-down/dist/angular/drop-down-model.directive.js 5:30-104
 @ ../node_modules/@proplugins/nativescript-drop-down/dist/angular/index.js
 @ ./app/framework/framework.module.ts
 @ ./app/pages/dashboard/dashboard.module.ts
 @ ./app/app-routing.module.ts
 @ ./app/app.module.ts
 @ ./main.ts

ERROR in ../node_modules/@proplugins/nativescript-drop-down/dist/drop-down.js
Module not found: Error: Can't resolve '@nativescript/core/ui/editable-text-base/editable-text-base' in '/Users/relvis/Projects/NSProjects/FloormastersMobile/node_modules/@proplugins/nativescript-drop-down/dist'
 @ ../node_modules/@proplugins/nativescript-drop-down/dist/drop-down.js 6:27-97
 @ ./app/framework/widgets/dropdown-widget/dropdown-widget.component.ts
 @ ./app/framework/framework.module.ts
 @ ./app/pages/dashboard/dashboard.module.ts
 @ ./app/app-routing.module.ts
 @ ./app/app.module.ts
 @ ./main.ts

Any ideas?

PeterStaev commented 4 years ago

Hey @relez , seems you are not using the @nativescript scoped packages. Make sure you have @nativescript/angular and @nativescript/core in your code/package.json.

relez commented 4 years ago

Hey @PeterStaev, actually I am using it, here my package.json file:

"dependencies": {
        "@angular/animations": "~10.0.6",
        "@angular/common": "~10.0.6",
        "@angular/compiler": "~10.0.6",
        "@angular/core": "~10.0.6",
        "@angular/forms": "~10.0.6",
        "@angular/platform-browser": "~10.0.6",
        "@angular/platform-browser-dynamic": "~10.0.6",
        "@angular/router": "~10.0.6",
        "@nativescript/angular": "~10.0.0",
        "@nativescript/core": "rc",
        "@nstudio/nativescript-checkbox": "~1.0.0",
        "@nstudio/nativescript-loading-indicator": "~3.0.4",
        "@proplugins/nativescript-dom": "^2.2.0",
        "@proplugins/nativescript-drop-down": "^8.0.0",
        "@proplugins/nativescript-globalevents": "^1.4.1",
        "@proplugins/nativescript-orientation": "^2.4.1",
        "@proplugins/nativescript-photo-editor": "^4.1.0",
        "moment": "~2.24.0",
        "nativescript-appversion": "~1.4.4",
        "nativescript-background-http": "~4.2.1",
        "nativescript-badge-button": "^0.1.2",
        "nativescript-barcodescanner": "~3.4.2",
        "nativescript-camera": "~4.5.0",
        "nativescript-directions": "~1.3.1",
        "nativescript-drawingpad": "~3.1.0",
        "nativescript-email": "~1.6.0",
        "nativescript-feedback": "~1.5.0",
        "nativescript-geolocation": "~5.1.0",
        "nativescript-imagepicker": "~7.1.0",
        "nativescript-inappbrowser": "~2.2.0",
        "nativescript-iqkeyboardmanager": "~1.5.1",
        "nativescript-mediafilepicker": "~3.0.1",
        "nativescript-modal-datetimepicker": "~1.2.2",
        "nativescript-numeric-keyboard": "~4.3.1",
        "nativescript-pdf-view": "~2.2.0",
        "nativescript-phone": "~2.0.0",
        "nativescript-store-update": "^1.0.2",
        "nativescript-theme-core": "~1.0.6",
        "nativescript-ui-calendar": "rc",
        "nativescript-ui-chart": "rc",
        "nativescript-ui-listview": "rc",
        "nativescript-ui-sidedrawer": "rc",
        "nativescript-videoplayer": "~4.2.1",
        "nativescript-videorecorder": "~3.0.0-beta.6",
        "reflect-metadata": "~0.1.13",
        "rxjs": "~6.5.5",
        "zone.js": "^0.10.3"
    },
    "devDependencies": {
        "@angular/compiler-cli": "~10.0.6",
        "@nativescript/webpack": "~2.1.3",
        "codelyzer": "^6.0.0",
        "copy-webpack-plugin": "6.0.3",
        "terser-webpack-plugin": "2.2.0",
        "typescript": "~3.9.5",
        "webpack": "4.43.0",
        "webpack-cli": "^3.3.12",
        "@ngtools/webpack": "~10.0.0"
    },
PeterStaev commented 4 years ago

@relez , ok, I was wrong. Seems there was reorganization around on the NS Angular code which causes plugins to fail. I will let you know once I've updated the plugin to support that (will probably be after NS version is officially out of RC).

nevardreik commented 4 years ago

Hi @PeterStaev we are upgrading our {N} application to support iOS14 and this plugin is causing us a lot of grief. Any idea when you will have an RC with Angular Ivy compatibility?

PeterStaev commented 4 years ago

@nevardreik as soon as the angular and core nativescript modules are at a more stable state. I've talked with people from nStudio and they expect more breaking changes coming to RC, so it is not worth changing the plugin now when it could potentially get broken again with the next RC build.

relez commented 4 years ago

Hi @PeterStaev, I am excited to hear back from you once the plugin is been updated to work with NS 7. In the meantime, preparing the project with the changes.

Thanks!

PeterStaev commented 4 years ago

Hey guys, I'm happy to announce the NS7/NG10 compatibility has landed with version 9.0.0 that is now available on the ProPlugins NPM.

NOTE: Make sure you are using @nativescript/core >= 7.0.1 as there were some missing bits in the 7.0.0 version!

alereisan commented 3 years ago

@PeterStaev when I try to install the plugin from @proplugins/nativescript-drop-down, i receive a 404 not found error: npm ERR! code E404 npm ERR! 404 Not Found - GET https://registry.npmjs.org/@proplugins%2fnativescript-drop-down - Not found npm ERR! 404 npm ERR! 404 '@proplugins/nativescript-drop-down@^8.0.0' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 It was specified as a dependency of 'ns-yoojis-ordering-app' npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.

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

relez commented 3 years ago

Hey @alereisan, to be able to download the code you need to login into the ProPlugin scope, please run this command on your terminal:

npm login --registry=https://npm.proplugins.org --scope=@proplugins

Make sure you have an account at https://accounts.nativescript.rocks/login and you are subscribed at ProPlugins to support their hard work.

After these steps, you will be able to download any plugin from @proplugin scope.

I hope this helps!