Pim-community-dev: Webpack TS error in version 3.2.x

Created on 9 Feb 2021  ·  5Comments  ·  Source: akeneo/pim-community-dev

Running yarn run webpack-dev is unsuccessful - it returns an error:

Versions:

  • pim 3.2.80
  • yarn 1.22.5
  • webpack 4.29.6

Log:

ERROR in /srv/pim/web/bundles/pimui/js/view/base.ts
./web/bundles/pimui/js/view/base.ts
[tsl] ERROR in /srv/pim/web/bundles/pimui/js/view/base.ts(193,3)
TS2416: Property 'render' in type 'BaseView' is not assignable to the same property in base type 'View'.
Type '() => View' is not assignable to type '() => this'.
ERROR in /srv/pim/web/bundles/pimui/js/view/base.ts
./web/bundles/pimui/js/view/base.ts
[tsl] ERROR in /srv/pim/web/bundles/pimui/js/view/base.ts(193,3)
TS2416: Property 'render' in type 'BaseView' is not assignable to the same property in base type 'View'.
Type '() => View' is not assignable to type '() => this'.
Type 'View' is not assignable to type 'this'.

image

This error appears consistently in our pipelines since 2021-02-03 and is not connected to any change in PIM version.

Most helpful comment

Locking the "@types/backbone": "1.4.5" version in package.json fixed the issue. Probably an update from types/backbone introduced the issue.

All 5 comments

We are also seeing the same on a 3.2.x Akeneo

Yes, I forgot to mention it is on version 3.2.x. Info added.

Locking the "@types/backbone": "1.4.5" version in package.json fixed the issue. Probably an update from types/backbone introduced the issue.

Locking the "@types/backbone": "1.4.5" version in package.json fixed the issue. Probably an update from types/backbone introduced the issue.

Thanks! Indeed, it seems to work.

The enterprise version 4.0.91 is also affected by this.
As suggested by @joachimVT, locking the version fixes the problem.

Was this page helpful?
0 / 5 - 0 ratings