-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
@nrwl/next: Cannot find module '@nrwl/next/plugins/with-nx' #15931
Comments
Not only |
I think there are two separate issues here.
(1) is not an Nx issue. If you know a plugin isn't needed you must check for the phase in your const { PHASE_PRODUCTION_SERVER } =require('next/constants');
const nextConfig = {
reactStrictMode: true,
};
module.exports = (phase) => {
if (phase === PHASE_PRODUCTION_SERVER) {
return nextConfig;
} else {
// This plugin only has an effect during build (e.g. it applies additional transforms)
const somePlugin = require('some-dev-only-plugin');
return somePlugin(nextConfig);
}
} (2) is something we can address for Nx 16. For now you must install it as a prod dependency. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Documentation issue
Is there a specific documentation page you are reporting?
@nrwl/next -> Setting up Next.js
Additional context or description
With changes from #15824 package
@nrwl/next
needs to be included independencies
, not in thedevDependencies
, otherwise generatedpackage.json
doesn't have@nrwl/next
and it's not possible to run the Next's application because of error:Workspace generated by command
npx create-nx-workspace@latest --preset=next
have@nrwl/next
in thedependencies
.The text was updated successfully, but these errors were encountered: