Regression: PagedJS broken in beta.20
See original GitHub issueDescribe the bug
Starting with beta.20 I can’t import { Previewer } from "pagedjs"
anymore (pagedjs
is a npm module).
It works until beta.19.
After beta.20 vite fails with the following error:
[plugin:vite:import-analysis] Failed to resolve entry for package "pagedjs". The package may have incorrect main/module/exports specified in its package.json.
/***/print/index.ts
Error: Failed to resolve entry for package "pagedjs". The package may have incorrect main/module/exports specified in its package.json.
at resolvePackageEntry (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:40062:15)
at tryNodeResolve (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:39920:11)
at Context.resolveId (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:39831:28)
at Object.resolveId (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:52711:53)
at processTicksAndRejections (node:internal/process/task_queues:93:5)
at async TransformContext.resolve (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:52495:23)
at async normalizeUrl (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:45852:34)
at async TransformContext.transform (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:45965:57)
at async Object.transform (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:52775:30)
at async transformRequest (C:\***\node_modules\vite\dist\node\chunks\dep-3d0f2228.js:590
System Info
vite
version: 2.0.0-beta.21- Operating System: win 10
- Node version: 15
- Package manager (npm/yarn/pnpm) and version: npm 7
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
Paged Break, the long overdue update - Paged.js —
Between June last year and this month of July, we've been through a lot of small changes, going from 0.2.0 to 0.4.1 beta...
Read more >Sveltejs with Paged.js - Cabbage Tree Labs Support
Hello I'm trying to use Paged.js in Sveltekit. ... .cabbagetreelabs.org/t/sveltejs-with-paged-js/91/1 > Not really a regression: beta.20 now ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It should break if the package itself provide broken info. Silently falling back and let it work, even with a warning, the result is you never bother filing the issue to the original package and it never gets fixed.
To get a temporary fix you can always manually alias it to the umd entry.
In think in this case it should fail explicitly. Implicitly falling back means you will be using an umd version that enjoys no treeshaking.