-
Notifications
You must be signed in to change notification settings - Fork 7
Since 1.1.3 'Cannot use import statement outside a module' #9
Comments
Interesting, https://github.com/yaakovfeldman/jest-issue/blob/939832187ba12d058ffdb347c29643af40786eb7/app.js#L2 is using |
I'm facing the same issue on latest
|
Unfortunately, switching jest between node and jsdom did not change anything. |
node { require: './app/dist/index.cjs.js', import: './app/dist/index.mjs' } [] [ 'require', 'default' ]
default ./app/dist/index.esm.js [] [ 'require', 'default' ] Ok, for some reason, Jest is not providing the |
So this workaround intended to fix jest issue is blocked by another issue of jest. Hilarious 😂. Let's workaround both these |
We could provide the |
Maybe let's have the temporary option just for node. Maybe name it with nodeResolutionType or something like that. It's much better than support old version or abandon everyone including node |
I'm open for ideas. |
I have the same error when I upgrade from 1.1.4 to 1.1.5
|
I'm also seeing this when upgrading form 1.1.4 to 1.1.5 when using firebase-admin |
Thank you very much for this library. It worked perfectly on version 1.1.2. However, on version 1.1.3 I get the error
SyntaxError: Cannot use import statement outside a module
when using thefirebase
package.My node app uses
require
but this is somehow getting changed toimport
.I made a minimal example at https://github.com/yaakovfeldman/jest-issue
Running
npm run test
with version 1.1.2 should produce no issues (except for jest complaining that the test suite contains no tests).Updating to version 1.1.3 produces:
The text was updated successfully, but these errors were encountered: