A clear and concise description of what the bug is.
Steps to reproduce the behavior, please provide code snippets or a repository:
npm install next@latestnext devexpected a smooth upgrade
[ error ] ./node_modules/next/dist/client/next-dev.js
[1] Error: Cannot find module 'babel-types'
.babelrc with next/babel presetI downgraded back to v9.3.0 in the meantime
Hi, I'm not able to reproduce this on a minimal Next.js project so it is most likely specific to your environment/project. Wiping node_modules and re-creating your lockfile (yarn.lock or package-lock) may help resolve this for your project
I'm seeing some node-gyp errors.. I'll verify and come up with a complete repro
I think I found the issue. I am using reasonML based on the nextjs examples.
I figured out that the babel preset of babel-plugin-bucklescript is no longer needed (that's the one requiring babel-types. By removing that preset from .babelrc it fixed the build.
I assume that babel-plugin-bucklescript was using babel-types as a peerDependency from nextjs.. Probably the new nextJS removed that dependency and that's why this babel plugin is crashing
I also noticed that babel-plugin-bucklescript is now deprecated and its repo is archived. Should I open a ticket to update the nextjs reason examples?
I also noticed that babel-plugin-bucklescript is now deprecated and its repo is archived. Should I open a ticket to update the nextjs reason examples?
Yep sure, could be that there's already an open one.
Going to close this issue as it's not related to Next.js, and we can't change anything here. Basically your app worked accidentally previously as that babel plugin was hoisting babel-types.