-
Notifications
You must be signed in to change notification settings - Fork 38
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
v3.2.x uses the latest open-next by default, but it's not compatible with open-next@3.0.0 #213
Comments
In case it's helps anyone to the source of their own issue, I initially encountered this via an error stating that the With some minor deidentification, the error was:
A quick search showed that at version v3.2.x, Line 13 in 2bf3c44
This led me to look for changes in |
I also left a message in the Discord group to hopefully help others find a solution if they also experience this issue: |
Thanks for the investigation! |
A few hours ago, I started experiencing build problems unrelated to any recent changes in my project.
After some digging, I realized that
open-next
published v3.0.0 about 6 hours ago and thatcdk-nextjs@v3.2.1
runsnpx --yes open-next
build with no apparent version specification specification anywhere. As I understand it, this means the latest version on npm will be executed and this is consistent with what I'm seeing (up to and including the build process stating OpenNext v3.0.0 is used).Specifying a build command like
npx --yes open-next@^2 build
or installingopen-next@2.3.9
as a part of my package dependencies resolves the problem.There is nothing broken with
open-next
that I've found, but the default build command incdk-nextjs@3.2.x
is no longer working as ofopen-next@3.0.0
(at least in some scenarios) unlessopen-next
is declared directly as a project dependency, this is the version that is used to build the target project.It looks like the beta versions of cdk-nextjs (i.e., v4.0.0-beta.x) won't have this problem because it specifies a version constraint:
cdk-nextjs/src/NextjsBuild.ts
Line 145 in 3a9a84f
I believe the
v3.2.x
problem can be resolved by adopting the same default command as inv4.0.0-beta.x
and would be happy to take a stab at the fix if that is agreeable.The text was updated successfully, but these errors were encountered: