rsnext/packages/create-next-app/helpers
Balázs Orbán 5a04e82ba9
fix(cli): do not throw error when extracting examples in Node 18+ (#40182)
`create-next-app` currently cannot extract examples/git repos in Node 18+, because of an issue with `node-tar` (https://github.com/npm/node-tar/issues/321). The files are extracted, but an error is thrown that the stream has been prematurely closed. To prevent `create-next-app` from not being able to finish, ~for now, we can swallow this error, and hopefully `node-tar` will be patched soon.~
we can save the tar in the `tmp` folder and extract it from there as suggested: https://github.com/vercel/next.js/pull/40182#pullrequestreview-1095216714

I cannot reproduce this on earlier Node.js versions. More context: https://github.com/vercel/next.js/issues/39321#issuecomment-1235642058

Fixes #39321



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-09-05 16:11:12 +00:00
..
examples.ts fix(cli): do not throw error when extracting examples in Node 18+ (#40182) 2022-09-05 16:11:12 +00:00
get-pkg-manager.ts feat: support pnpm with create-next-app (#34947) 2022-03-04 00:49:24 +01:00
git.ts feat: update create-next-app to init with main as initial branch (#17745) 2020-11-07 14:46:17 +00:00
install.ts Add handling for auto installing TypeScript deps and HMRing tsconfig (#39838) 2022-08-23 13:16:47 -05:00
is-folder-empty.ts Add yarn 2 Setup Files to Valid Files for create-next-app (#30936) 2022-08-07 22:05:48 -05:00
is-online.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
is-writeable.ts CNA: Add warning about permission (#14889) 2020-08-19 17:09:34 +00:00
make-dir.ts CNA: replace make-dir with core recursive mkdir (#15006) 2020-07-10 01:29:03 +00:00
validate-pkg.ts Update to latest babel versions (#28174) 2021-08-17 09:18:08 +02:00