This relates to a bug from issue #38957 found inside of the `with-cypress` example as a result of the recent typescript conversion. This issue can be resolved with adding `export {};` which prevents TypeScript from reading `.ts` configuration files from being read as legacy script files. This issue has been resolved on StackOverflow [here](https://stackoverflow.com/questions/56577201/why-is-isolatedmodules-error-fixed-by-any-import). More info on `--isolatedModules` can be read [here](https://www.typescriptlang.org/tsconfig#isolatedModules).
## Bug
- [x] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`
Fixes#38597
- Update `with-cypress` example dependencies;
- Convert `with-cypress` example to TypeScript as suggested in the Contribution docs.
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
This PR updates the docs and examples for `create-next-app` to include pnpm usage.
The following script was used to update every example README:
```js
const fs = require('fs')
const examples = fs.readdirSync('./examples')
for (let example of examples) {
const filename = `./examples/${example}/README.md`
const markdown = fs.readFileSync(filename, 'utf8')
const regex = new RegExp(`^yarn create next-app --example (.*)$`, 'gm')
const output = markdown.replace(regex, (yarn, group) => {
const pnpm = `pnpm create next-app -- --example ${group}`
return `${yarn}\n# or\n${pnpm}`
})
fs.writeFileSync(filename, output)
}
```
* Add ci script to check examples
* Install moreutils for `sponge` command.
It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script
* Prettier names in the workflow
* Move "check-examples" into build_test_deploy workflow
* Start breaking the jq script into multiple lines
* Add checks for cleanups in vercel/next.js#27121
* Run the `check-examples.sh` script to cleanup all remaining examples.
This PR adds a with-cypress example to match the examples in upcoming docs.
## Documentation / Examples
- [ ] Make sure the linting passes
**Note:** This PR does not pass linting because ESLint needs to have the [eslint-plugin-cypress](https://github.com/cypress-io/eslint-plugin-cypress) installed globally to ignore the Cypress methods.