You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Next v12 has a function that, on dev or build, will look at the tsconfig and make suggestions.
If you have a mono repo setup and the nearest tsconfig is not at the root of the repo, extending a tsconfig without the incremental config option will break the build.
To see this, just try running yarn dev without making any changes. You should see this error:
TypeError: Cannot set property 'incremental' of undefined
at ~\v12-next-bug\node_modules\next\dist\lib\typescript\writeConfigurationDefaults.js:150:57)
at async Object.verifyTypeScriptSetup (~\v12-next-bug\node_modules\next\dist\lib\verifyTypeScriptSetup.js:81:9)
at async DevServer.prepare (~\v12-next-bug\node_modules\next\dist\server\dev\next-dev-server.js:262:9)
```
If you go into the next.config and point the tsconfigPath at the nearest tsconfig, you get the same error.
If you instead point it to the tsconfig at the root of the repo, the build has no issues
The text was updated successfully, but these errors were encountered:
A tsconfig like:
```
{
"extends": "..."
}
```
currently fails the build if the config that is extended from has not the expected configuration (and we want to update it)
Fixes: #30360
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 27, 2022
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
…#30355)
A tsconfig like:
```
{
"extends": "..."
}
```
currently fails the build if the config that is extended from has not the expected configuration (and we want to update it)
Fixes: vercel#30360
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12
What version of Node.js are you using?
14.17.5
What browser are you using?
Chrome
What operating system are you using?
mac, windows
How are you deploying your application?
Vercel
Describe the Bug
Next v12 has a function that, on dev or build, will look at the tsconfig and make suggestions.
If you have a mono repo setup and the nearest tsconfig is not at the root of the repo, extending a tsconfig without the
incremental
config option will break the build.Check this repro repo out:
https://github.com/akadop/next-v12-monorepo-bug
Expected Behavior
The
next
commands (dev, build, start) all work correctly as they have been with prior versionsTo Reproduce
Check this repro repo out:
https://github.com/akadop/next-v12-monorepo-bug
To see this, just try running
yarn dev
without making any changes. You should see this error:If you go into the next.config and point the tsconfigPath at the nearest tsconfig, you get the same error.
If you instead point it to the tsconfig at the root of the repo, the build has no issues
The text was updated successfully, but these errors were encountered: