Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build errors after upgrade to 1.0.3 #1646

Closed
t-works opened this issue Dec 2, 2021 · 5 comments · Fixed by #1649 or #1651
Closed

build errors after upgrade to 1.0.3 #1646

t-works opened this issue Dec 2, 2021 · 5 comments · Fixed by #1649 or #1651
Labels
bug Concrete, reproducible bugs

Comments

@t-works
Copy link

t-works commented Dec 2, 2021

Bug Report

Steps to Reproduce:

change perspective version from 1.0.1 to 1.0.3

Expected Result:

build project

Actual Result:

build errors:

ERROR in ./node_modules/@finos/perspective-viewer/dist/pkg/perspective_viewer.js 1:0-90
Module not found: Error: Can't resolve './snippets/perspective-viewer-c0843f68e2505c94/inline0.js' in '[..]\node_modules@finos\perspective-viewer\dist\pkg'
@ ./node_modules/@finos/perspective-viewer/dist/esm/perspective-viewer.js 2:29690-29796 2:29925-29927
@ ./src/index.tsx 14:0-35

ERROR in Conflict: Multiple assets emit different content to the same filename editor.worker.js.map

ERROR in Conflict: Multiple assets emit different content to the same filename editor.worker.js

ERROR in [..]\src\index.tsx
./src/index.tsx
[tsl] ERROR in [..]\src\index.tsx(19,70)
TS2307: Cannot find module '@finos/perspective-viewer' or its corresponding type declarations.

ERROR in [..]\src\index.tsx
./src/index.tsx
[tsl] ERROR in [..]\src\index.tsx(47,12)
TS2339: Property 'perspective-viewer' does not exist on type 'JSX.IntrinsicElements'.

ERROR in [..]\src\index.tsx
./src/index.tsx
[tsl] ERROR in [..]\src\index.tsx(47,72)
TS2339: Property 'perspective-viewer' does not exist on type 'JSX.IntrinsicElements'.

Environment:

windows 10
example repo: https://github.com/t-works/perspective1.0.3-react-error

@texodus texodus added the bug Concrete, reproducible bugs label Dec 2, 2021
@texodus
Copy link
Member

texodus commented Dec 2, 2021

Thanks for the report @t-works! This is a bug introduced by our recent switch to esbuild as our packaging tool, which as I just now realized does not support generating TS declaration files. We'll get this fixed for the upcoming release, for now as a workaround you can

  • Use 1.0.0 (obviously ..) or
  • ts-ignore these errors - they should just be type errors, and I checked e.g. the built-in react example with yarn start react, which outputs the same errors but does compile and work.

@t-works
Copy link
Author

t-works commented Dec 4, 2021

Thank you very much for your feedback! We are using the 1.0.1 for the time being.
yep, we could TS ignore but this one:
Module not found: Error: Can't resolve './snippets/perspective-viewer-c0843f68e2505c94/inline0.js' in '[..]\node_modules@finos\perspective-viewer\dist\pkg'

does not allow us to build 1.0.3 - it is trying to find the file:
]\node_modules@finos\perspective-viewer\dist\pkg\snippets\perspective-viewer-c0843f68e2505c94/inline0.js
that does not exist.

Best
Jerzy Kurowski

@texodus texodus reopened this Dec 4, 2021
@texodus
Copy link
Member

texodus commented Dec 4, 2021

@t-works aha you are exactly right, good catch! Verified this is missing on 1.0.3.

It appears that wasm-pack emits a .gitignore in this directory during compilation that overrides the package.json "files" key, causing ./snippets/perspective-viewer-c0843f68e2505c94/ to not be packaged.

@timkpaine
Copy link
Member

@t-works @texodus nice, I was just experiencing this same error

@texodus
Copy link
Member

texodus commented Dec 6, 2021

Both fixes are in the 1.0.4 release.

@texodus texodus added this to the 1.0.4 milestone Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
3 participants