Skip to content
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

Monorepo: "Next not found in both dependencies and devDependencies." #476

Open
nandorojo opened this issue Jul 22, 2024 · 0 comments
Open

Comments

@nandorojo
Copy link

Getting this error when I build in prod:

[nextron] Next not found in both dependencies and devDependencies.

It's due to this code:

if (!nextVersion) {
nextVersion = devDependencies.next
if (!nextVersion) {
logger.error('Next not found in both dependencies and devDependencies.')
process.exit(1)
}
}

next is getting pulled from a root monorepo. The solution would be to add this line:

require('next/package.json').version

This way it evaluates the package correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant