<@U01JVDKASAC>, <@U01MV4U2EV9> : After upgrading t...
# help
v
@Frank, @thdxr : After upgrading to SST v1, I started seeing this error in our unit tests:
Copy code
SyntaxError: Cannot use 'import.meta' outside a module

    > 1 | import * as sst from "@serverless-stack/resources";
Is there any jest dependency need be explicitly added after upgrading to v1?
t
can you try adding
type: "module"
to your root package.json
jest does not deal with esm well at all
a
@Ali Sharabiani FYI ☝️
t
I had to do this in the past to get it working
v
thanks @thdxr: will try that!
t
another option is to switch to vitest, which is what we did
everything just works
v
I get this error when I added type:"module" it reported this error:
Copy code
Error: Must use import to load ES Module: jest.config.ts
require() of ES modules is not supported