You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@nrwl/next in package.json dependency leads to errors when running in production with npm install --omit=dev --prefer-offline --no-audit --ignore-scripts
Expected Behavior
@nrwl/next can be put into devDependencies and the app runs
GitHub Repo
No response
Steps to Reproduce
Create a simple new nx next app.
Dockerize it with the following docker file.
FROM node:18-alpine
ENV NODE_ENV=production
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install --omit=dev --prefer-offline --no-audit --ignore-scripts
error - Failed to load next.config.js, see more info here https://nextjs.org/docs/messages/next-config-error
Error: Cannot find module '@nrwl/next/plugins/with-nx'
Require stack:
- /app/next.config.js
at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at mod._resolveFilename (/app/node_modules/next/dist/build/webpack/require-hook.js:23:32)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at Object.<anonymous> (/app/next.config.js:2:16)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '/app/next.config.js' ]
}
Additional Information
No response
The text was updated successfully, but these errors were encountered:
ckaeslin
changed the title
@nrwl/next need as dependency rather than devDependency
@nrwl/next needed as dependency rather than devDependency
Apr 26, 2023
Current Behavior
Probably a regression of #12150
@nrwl/next in package.json dependency leads to errors when running in production with npm install --omit=dev --prefer-offline --no-audit --ignore-scripts
Expected Behavior
@nrwl/next can be put into devDependencies and the app runs
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
Additional Information
No response
The text was updated successfully, but these errors were encountered: