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

Upgrading 3.0.3 -> 3.2.0 with Webpack5, Yarn2, dexie.js is not exported from package #1437

Closed
phil-w opened this issue Nov 20, 2021 · 2 comments

Comments

@phil-w
Copy link

phil-w commented Nov 20, 2021

Upgrading from 3.0.3 to 3.0.2 my webpack 5 / Yarn 2 build starts to fail with:

ERROR in ./ClientApp/.../dexieDB.js 3:0-26
Module not found: Error: Package path ./dist/dexie.js is not exported from package 
...Repo\.yarn\cache\dexie-npm-3.2.0-575507c806-59b6fd600a.zip\node_modules\dexie\ 
(see exports field in ... node_modules\dexie\package.json)

If I look up the differences between those two package.json files, the error is caused by the addition in 3.2.0 of an "exports", viz:
"exports": "./dist/modern/dexie.mjs",

The new "exports" entry explicitly exports "dexie.mjs", where as my webpack/ yarn2 stuff is apparently expecting dexie.js, as the error message suggests. My import has been: import Dexie from 'dexie';

The release notes: https://github.com/dfahlander/Dexie.js/releases don't mention this specifically.
This is the change wot broke me build.

I can probably alias it somehow, but maybe I'm doing something stupid?


Update: yes, it's my stupidity:
I was aliasing to dexie.js, not dexie.mjs, so that'd cause this. Please close!

@dfahlander
Copy link
Collaborator

Ok thanks for finding the reason. Closing

@dfahlander
Copy link
Collaborator

See #1439 which is resolved in 3.2.1-beta.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants