ng2-smart-table icon indicating copy to clipboard operation
ng2-smart-table copied to clipboard

Breaking changes in 1.6.0

Open SnakyBeaky opened this issue 5 years ago • 13 comments

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

SnakyBeaky avatar Mar 24 '20 16:03 SnakyBeaky

Same here

vic10us avatar Mar 24 '20 16:03 vic10us

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.

fdiogoc avatar Mar 25 '20 02:03 fdiogoc

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?

majhoos avatar Mar 25 '20 14:03 majhoos

Downgrade to version 1.5.0 until fix.

-npm uninstall ng2-smart-table -npm i [email protected] --save

axel012 avatar Mar 28 '20 20:03 axel012

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

mateuszradny avatar Apr 16 '20 20:04 mateuszradny

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.

SnakyBeaky avatar Apr 17 '20 08:04 SnakyBeaky

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.

KratiJainImp avatar Apr 23 '20 08:04 KratiJainImp

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

lenichols avatar May 19 '20 12:05 lenichols

Downgrade to version 1.5.0 until fix.

-npm uninstall ng2-smart-table -npm i [email protected] --save

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

JubinSaniei avatar May 30 '20 01:05 JubinSaniei

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.

BrianSeng avatar Jun 04 '20 22:06 BrianSeng

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

chriss5 avatar Jun 09 '20 07:06 chriss5

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?

Harrrykrishnan avatar Apr 27 '21 03:04 Harrrykrishnan

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

alexey-kostylev avatar Apr 04 '24 04:04 alexey-kostylev