Commit 01cd4ab
authored
fix: next build in typescript 5.0 (#45275)
Related: https://github.com/microsoft/TypeScript/blob/ff92ab0ac92b66397bd3b92ff5a3aca3c1ad8f43/src/compiler/types.ts#L6901
Upstream: https://github.com/microsoft/TypeScript/pull/51901/files#diff-e9fd483341eea176a38fbd370590e1dc65ce2d9bf70bfd317c5407f04dba9560R6890
```shell
> @blocksuite/next-example@ build /Users/himself65/Code/blocksuite/packages/react/examples/next
> next build
info - Linting and checking validity of types ..We detected TypeScript in your project and reconfigured your tsconfig.json file for you. Strict-mode is set to false by default.
The following mandatory changes were made to your tsconfig.json:
- moduleResolution was set to node (to match webpack resolution)
warn - TypeScript project references are not fully supported. Attempting to build in incremental mode.
> Build error occurred
Error: Debug Failure. Unexpected moduleResolution: node
at resolveModuleName (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:39044:24)
at Object.resolve (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:114797:47)
at loadWithModeAwareCache (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:114837:40)
at actualResolveModuleNamesWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:115072:126)
at resolveModuleNamesWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:115389:22)
at resolveModuleNamesReusingOldState (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:115541:77)
at processImportedModules (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:117013:29)
at findSourceFileWorker (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:116775:9)
at findSourceFile (/Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:116640:22)
at /Users/himself65/Code/blocksuite/node_modules/.pnpm/[email protected]/node_modules/typescript/lib/typescript.js:116589:24 {
type: 'Error'
}
info - Linting and checking validity of types . ELIFECYCLE Command failed with exit code 1.
Process finished with exit code 1
```
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/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`
- [ ] [e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs) tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see [`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
## Documentation / Examples
- [x] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)1 parent b90b48e commit 01cd4ab
File tree
1 file changed
+6
-2
lines changed- packages/next/src/lib/typescript
1 file changed
+6
-2
lines changedLines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
57 | 60 | | |
58 | 61 | | |
59 | | - | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
0 commit comments