You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
With the new GVL v3 (TCF 2.2) support, TCModelFactory stopped working.
Functions TCModelFactory.noGVL(); and TCModelFactory.withGVL(); throw the following error: Error: Cannot find module './vendorlist/v2/vendor-list.json' from 'node_modules/@iabtechlabtcf/testing/lib/cjs/GVLFactory.js'
The reason is that TCModelFactory uses GVLFactory.getLatest() inside which calls the GVL resource with schema value of "v2" and for "v2" there's no latest vendor list json (./vendorlist/v2/vendor-list.json). This only works with "v2.2" passed as a schema parameter in GVLFactory.getLatest("v2.2").
The solution would be to change the default behaviour or add schema or any other parameters to the TCModelFactory functions.
I worked around this issue by manually creating TCModel and attaching gvl with GVLFactory.getLatest("v2.2") but I thought it's worth reporting that TCModelFactory is broken with the TCF 2.2 updates.
The text was updated successfully, but these errors were encountered:
Hey @nejcsever I found the cause of the issue. NPM does not include symlinks when it is packing the files to be published. Only the vendor-list.json inside v2.2 is not a symlink which is why it appears there and not in v2. Link to PR
Module
@iabtechlabtcf/testing
Version
1.5.9
Description
With the new GVL v3 (TCF 2.2) support,
TCModelFactory
stopped working.Functions
TCModelFactory.noGVL();
andTCModelFactory.withGVL();
throw the following error:Error: Cannot find module './vendorlist/v2/vendor-list.json' from 'node_modules/@iabtechlabtcf/testing/lib/cjs/GVLFactory.js'
The reason is that TCModelFactory uses
GVLFactory.getLatest()
inside which calls the GVL resource with schema value of "v2" and for "v2" there's no latest vendor list json (./vendorlist/v2/vendor-list.json). This only works with "v2.2" passed as a schema parameter inGVLFactory.getLatest("v2.2")
.The solution would be to change the default behaviour or add schema or any other parameters to the TCModelFactory functions.
I worked around this issue by manually creating TCModel and attaching gvl with
GVLFactory.getLatest("v2.2")
but I thought it's worth reporting that TCModelFactory is broken with the TCF 2.2 updates.The text was updated successfully, but these errors were encountered: