akveo / ng2-smart-table

Angular Smart Data Table component
https://akveo.github.io/ng2-smart-table/
MIT License
1.63k stars 879 forks source link

Breaking changes in 1.6.0 #1143

Open SnakyBeaky opened 4 years ago

SnakyBeaky commented 4 years ago
Could not resolve @akveo/ng2-completer relative to [object Object].
node_modules/ng2-smart-table/lib/components/cell/cell-editors/completer-editor.component.d.ts(2,34): error TS2307: Cannot find module '@akveo/ng2-completer'.
node_modules/ng2-smart-table/lib/components/filter/filter-types/completer-filter.component.d.ts(3,34): error TS2307: Cannot find module '@akveo/ng2-completer'.
node_modules/ng2-smart-table/lib/components/tbody/tbody.component.d.ts(29,9): error TS1086: An accessor cannot be declared in an ambient context.
error TS2339: Property 'settings' does not exist on type 'Row'.
error TS2339: Property 'source' does not exist on type 'Row'.
error TS2339: Property 'userRowSelect' does not exist on type 'Row'.
error TS2339: Property 'create' does not exist on type 'Row'.
error TS2339: Property 'grid' does not exist on type 'Row'.
error TS2339: Property 'edit' does not exist on type 'Row'.
error TS2339: Property 'grid' does not exist on type 'Row'.
error TS2339: Property 'delete' does not exist on type 'Row'.
error TS2339: Property 'prepareSettings' does not exist on type 'Row'.
error TS2339: Property 'editRowSelect' does not exist on type 'Row'.

Had to downgrade back to 1.5.0

vic10us commented 4 years ago

Same here

fdiogoc commented 4 years ago

Have you installed @akveo/ng2-completer?

BREAKING CHANGE:

  • ng2-completer dependency replaced by @akveo/ng2-completer. Read details in #1140. This is a temporary measure until the original ng2-completer fixed. We have no plans to support @akveo/ng2-completer.
  • We no longer have a direct dependency on tslib. Instead it is now listed a peerDependency. This matches Angular framework.
majhoos commented 4 years ago

I installed npm install @akveo/ng2-completer --save

but I still experience build problem:

ng build --prod

results in the following error:

ERROR in ./node_modules/ng2-smart-table/ng2-smart-table.ngfactory.js
Module not found: Error: Can't resolve '../@akveo/ng2-completer/ng2-completer.ngfactory' in 'G:\Source\ShareHolderV2\node_modules\ng2-smart-table'
resolve '../@akveo/ng2-completer/ng2-completer.ngfactory' in 'G:\Source\ShareHolderV2\node_modules\ng2-smart-table'
  using description file: G:\Source\ShareHolderV2\node_modules\ng2-smart-table\package.json (relative path: .)
    Field 'browser' doesn't contain a valid alias configuration
    using description file: G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\package.json (relative path: ./ng2-completer.ngfactory)
      no extension
        Field 'browser' doesn't contain a valid alias configuration
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory doesn't exist
      .ts
        Field 'browser' doesn't contain a valid alias configuration
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.ts doesn't exist
      .tsx
        Field 'browser' doesn't contain a valid alias configuration
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.tsx doesn't exist
      .mjs
        Field 'browser' doesn't contain a valid alias configuration
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.mjs doesn't exist
      .js
        Field 'browser' doesn't contain a valid alias configuration
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.js doesn't exist
      as directory
        G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory doesn't exist
[G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory]
[G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.ts]
[G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.tsx]
[G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.mjs]
[G:\Source\ShareHolderV2\node_modules\@akveo\ng2-completer\ng2-completer.ngfactory.js]
 @ ./node_modules/ng2-smart-table/ng2-smart-table.ngfactory.js 13:0-70 291:11-33 291:35-61 589:11-33 589:35-61
 @ ./src/app/tag/tag-list/tag-list.component.ngfactory.js
 @ ./src/app/app.module.ngfactory.js
 @ ./src/main.ts
 @ multi ./src/main.ts

Am I missing something or everybody gets above build error?

axel012 commented 4 years ago

Downgrade to version 1.5.0 until fix.

-npm uninstall ng2-smart-table -npm i ng2-smart-table@1.5.0 --save

mateuszradny commented 4 years ago

Same here. Is the downgrade to version 1.5.0 the only solution for that problem?

SnakyBeaky commented 4 years ago

So far no response from the developers. 1.6.0 was mainly an upgrade to Angular 9. If you're not using it, you're probably not missing on anything.

KratiJainImp commented 4 years ago

Any update on this as we are also facing the same issue while upgrading our project to Angular 9. Downgrading is not an option as upgrading to Angular 9 is our agenda.

lenichols commented 4 years ago

I got 1.6.0 to work in angular 9. Now setFilter doesn't seem to work. This sucks.

JubinSaniei commented 4 years ago

Downgrade to version 1.5.0 until fix.

-npm uninstall ng2-smart-table -npm i ng2-smart-table@1.5.0 --save

and make sure to run -npm i ng2-completer --save

BrianSeng commented 4 years ago

I got 1.6.0 to work in angular 9. Now setFilter doesn't seem to work. This sucks.

Hi @lenichols how did you manage to get it to work? I'm trying to use 1.6.0 w/ the @akveo/ng2-completer dependency on angular 9 as well. I'm currently getting no errors, but the data table doesn't seem to render on my page.

chriss5 commented 4 years ago

I think the errors (Property 'xxx' does not exist on type 'Row'.) mentioned in the original comment are caused by the hack/workaround to import ɵbo as Ng2SmartTableComponent. For 1.6.0 that workaround no longer seems to be necessary, see my comment in #1097

Harrrykrishnan commented 3 years ago

I got 1.6.0 to work in angular 9. Now setFilter doesn't seem to work. This sucks.

Hi @lenichols how did you manage to get it to work? I'm trying to use 1.6.0 w/ the @akveo/ng2-completer dependency on angular 9 as well. I'm currently getting no errors, but the data table doesn't seem to render on my page.

Great! to know you could solve this issue. Could you state us the step you followed to solve?

alexey-kostylev commented 7 months ago

is version "1.6.0" compatible with angular 9 or not?