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
Perspective version: 3.1.7 (older versions are likely to be affected as well)
Steps to Reproduce:
Add "@finos/perspective-viewer-d3fc": "^3.1.7" and "@finos/perspective-viewer-datagrid": "^3.1.7" to your package.jsondependencies
Try to import them in any typescript file
Expected Result:
No import errors
Actual Result:
perspective-viewer-datagrid
In the case of @finos/perspective-viewer-datagrid the following error:
TS7016: Could not find a declaration file for module '@finos/perspective-viewer-datagrid'. '/project/node_modules/@finos/perspective-viewer-datagrid/dist/esm/perspective-viewer-datagrid.js' implicitly has an 'any' type.
There are types at '/project/node_modules/@finos/perspective-viewer-datagrid/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@finos/perspective-viewer-datagrid' library may need to update its package.json or typings.
My suggestion - amend the package.json "exports" in the following manner that is consistent with base @finos/perspective package:
This change fixes the error in my local environment.
perspective-viewer-d3fc
In the case of @finos/perspective-viewer-d3fc the following error:
TS7016: Could not find a declaration file for module '@finos/perspective-viewer-d3fc'. '/project/node_modules/@finos/perspective-viewer-d3fc/dist/esm/perspective-viewer-d3fc.js' implicitly has an 'any' type.
Try npm i --save-dev @types/finos__perspective-viewer-d3fc if it exists or add a new declaration (.d.ts) file containing declare module '@finos/perspective-viewer-d3fc';
My suggestion is the same - amend the package.json "exports" in the following manner:
"exports": {
".": {
"types": "./dist/esm/types.d.ts", // or perhaps "./dist/esm/index.d.ts"? Idk, just guessing"default": "./dist/esm/perspective-viewer-d3fc.js"
},
...
This change fixes the error in my local environment as well.
Environment:
Node: v23.1.0
OS: Manjaro Linux rolling
Additional Context:
package manager: npm
vite: v6
The text was updated successfully, but these errors were encountered:
Bug Report
Perspective version:
3.1.7
(older versions are likely to be affected as well)Steps to Reproduce:
"@finos/perspective-viewer-d3fc": "^3.1.7"
and"@finos/perspective-viewer-datagrid": "^3.1.7"
to yourpackage.json
dependencies
Expected Result:
No import errors
Actual Result:
perspective-viewer-datagrid
In the case of
@finos/perspective-viewer-datagrid
the following error:My suggestion - amend the package.json "exports" in the following manner that is consistent with base
@finos/perspective
package:This change fixes the error in my local environment.
perspective-viewer-d3fc
In the case of
@finos/perspective-viewer-d3fc
the following error:My suggestion is the same - amend the package.json "exports" in the following manner:
This change fixes the error in my local environment as well.
Environment:
Node: v23.1.0
OS: Manjaro Linux rolling
Additional Context:
The text was updated successfully, but these errors were encountered: