synpress
synpress copied to clipboard
[๐ Bug]: Building Next.js app throws error
๐ 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.0-alpha.7
Node.js version
21.6.2
Operating system
macOS
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?
We are using Playwright for our Next.js app. I've used Synpress v4 and made the initial setup working. But when I build my app, I'm getting the following error:
../../node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]/node_modules/@synthetixio/synpress-metamask/src/fixtures/metaMaskFixtures.ts:56:23
Type error: Property 'HEADLESS' comes from an index signature, so it must be accessed with ['HEADLESS'].
54 | const browserArgs = [`--disable-extensions-except=${metamaskPath}`]
55 |
> 56 | if (process.env.HEADLESS) {
| ^
57 | browserArgs.push('--headless=new')
58 |
59 | if (slowMo > 0) {
What is your expected behavior?
Build the Next.js app as expected
How to reproduce the bug.
Relevant log output
-