-
Notifications
You must be signed in to change notification settings - Fork 343
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
Akita 7 fails in jest because we are missing type:module from package.json #778
Comments
+1 Same here with jest 27.4.3 |
any workarounds? Adding |
I am also getting this. Diff: tony/cv@bf4d4a1 |
@NetanelBasal Any details on this? |
This reverts commit bf4d4a1. salesforce/akita#778
@NathanAlcantara I appreciate the link! Thank you. Hm, I still don't have an idea what's going on. Any idea on what's changed in Akita between 6 and 7 that could be causing this issue? Regarding the the |
I'm not sure. I didn't change anything. I think it is something with Jest. |
@NetanelBasal if I downgrade Akita to vrs 6.2.0, it works fine with same version of jest. |
@NetanelBasal And at #778 (comment) I have a diff and CI runs shows specifically that updating 6 -> 7 However, that still doesn't preclude the issue being rooted our own project's environmental / config issues rather than akita's build/packaging/etc. It could still be our environment's were / have become incorrect and something underneath the hood, e.g. an inner dependency, brought it to the forefront |
We are not doing anything special. We're using Nx to build the package. Is there any issue in Nx regarding what you describe? |
Maybe this will help you #781 (comment) |
@NetanelBasal I consulted the NX docs and could not find any mentions on how to build multiple module types. Pre nx13 akita had many module systems bundled and referenced in the package.json, now only the ESModule version is bundled. My personal preference would be to try to continue to support multiple module types. Maybe building with |
Is this a regression?
Yes
Description
The akita package.json does not include
"type": "module"
https://unpkg.com/browse/@datorama/akita@7.0.1/package.json
and node will treat "main" field as commonjs if not specified.
https://nodejs.org/api/esm.html#esm_enabling
I'm not sure if this is the only thing that needs doing for it to work, but I'm guessing someone else knows :)
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: