-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Required TypeScript & Types packages, despite being installed #36201
Comments
By moving all |
Hi, can you confirm your lockfile |
it looks like my Yarn.lock is correct, but I could be wrong. Here's the lock for
|
The same happens to me. The only thing that solved the issue was moving ALL of the dev dependencies to the regular dependencies list. |
The same issue. locally works fine, but on the AWS CodeBuild crashes UPD: moving ALL of the dev dependencies to the regular dependencies fixed problem, but looks not good :-/ |
Hi, I'm not able to reproduce this following the steps shared, please provide a reproduction with a repo where you are seeing this occur (test deployment can be seen here). |
I'm also getting the same issue. @DeveloperRyan Were you able to solve this somehow? |
Same issue, blocking vercel deploys. Moving everything out of devDependencies reduces the failure down to:
Edit: solved with violence. Blew up my package-lock and regenerated it. |
@imogenkinsman can you share the repo you saw this occur on before regenerating the package-lock? |
I believe this is fixed. Newer versions of The fix is in da6f271 and is part of v12.1.5 and up. EDIT: Just noticed that that fix should also already be in the versions mentioned by @DeveloperRyan, so this may be unrelated. |
Seems like there is a bug in some @types/react version. The issue was solved for me by simply updating the @types/react version In case of npm, do this, And for yarn, do |
…39838) This adds handling for auto-detecting TypeScript being added to a project and installing the necessary dependencies instead of printing the command and requiring the user run the command. We have been testing the auto install handling for a while now with the `next lint` command and it has worked out pretty well. This also adds HMR handling for `jsconfig.json`/`tsconfig.json` in development so if the `baseURL` or `paths` configs are modified it doesn't require a dev server restart for the updates to be picked up. This also corrects our required dependencies detection as previously an incorrect `paths: []` value was being passed to `require.resolve` causing it to fail in specific situations. Closes: #36201 ### `next build` before https://user-images.githubusercontent.com/22380829/186039578-75f8c128-a13d-4e07-b5da-13bf186ee011.mp4 ### `next build` after https://user-images.githubusercontent.com/22380829/186039662-57af22a4-da5c-4ede-94ea-96541a032cca.mp4 ### `next dev` automatic setup and HMR handling https://user-images.githubusercontent.com/22380829/186039678-d78469ef-d00b-4ee6-8163-a4706394a7b4.mp4 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
After running
yarn create next-app next-tailwind-typescript-starter --example with-typescript
thenyarn build
, I get the errorMy package.json
My tsconfig.json
This error was mentioned in #36085, #36103, and #36103. I have attempted to change the
Next
version to the most recent canary as well as the specified12.1.5-canary.6
. Additionally, I have attempted to downgrade@types/react
to version18.0.1
.Expected Behavior
next build
should not result in any errors and should deploy successfully.To Reproduce
Run
yarn create next-app next-tailwind-typescript-starter --example with-typescript
andyarn add --dev @types/react @types/react-dom @types/node
. Attempt to build (specifically on Vercel in my case) withnext build
.The text was updated successfully, but these errors were encountered: