synpress
synpress copied to clipboard
[๐ Bug]: Cannot find module '@synthetixio/synpress-cache' or its corresponding type declarations.ts
๐ Have you searched existing issues to avoid duplicates?
- [x] I have made sure that my issue is not a duplicate.
๐งช Have you tested your code using latest version of Synpress?
- [x] I have made sure that my issue still exists on latest version of Synpress.
๐ก Are you able to provide enough information to be able to reproduce your issue locally?
- [x] I can provide enough details to reproduce my issue on local environment.
Synpress version
4.0.5
Node.js version
23.5.0
Operating system
macOS 15.3
Run mode
Playwright + Synpress (as plugin)
CI platform (if applicable)
No response
Are you running your tests inside docker? (if applicable)
- [ ] This issue could be related to docker.
What happened?
Following the docs: https://docs.synpress.io/docs/setup-playwright
I create my basic.setup.ts, like the docs say, and I get this error:
Cannot find module '@synthetixio/synpress-cache' or its corresponding type declarations.ts(2307)
On this line:
import { defineWalletSetup } from "@synthetixio/synpress-cache";
I'd love to update the docs to fix
What is your expected behavior?
No error
How to reproduce the bug.
Following the docs: https://docs.synpress.io/docs/setup-playwright
- install synpress
- Make a
basic.setup.ts - Paste the code from the docs in there
import { defineWalletSetup } from "@synthetixio/synpress-cache";
import { MetaMask } from "@synthetixio/synpress/playwright";
// Define a test seed phrase and password
export const SEED_PHRASE =
"test test test test test test test test test test test junk";
export const PASSWORD = "Tester@1234";
// Define the basic wallet setup
export default defineWalletSetup(PASSWORD, async (context, walletPage) => {
// Create a new MetaMask instance
const metamask = new MetaMask(context, walletPage, PASSWORD);
// Import the wallet using the seed phrase
await metamask.importWallet(SEED_PHRASE);
// Additional setup steps can be added here, such as:
// - Adding custom networks
// - Importing tokens
// - Setting up specific account states
});
Relevant log output