Replies: 1 comment
-
This did the job. closing the issue
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
next
sets the absolute path ofnode_modules
to current directory.For example
"/home/ktl2/Projects-2025/nicer_so/product-nextjs/node_modules/next/dist/lib/metadata/metadata-boundary.js
.Notice
/home/ktl2/Projects-2025/nicer_so/product-nextjs
Non-Goals
No response
Background
Use case for this feature is this:
You work with a devops but he did not sign any NDA or a contract, therefore you need to give him compiled/minified code to do his job.
In this case I will do these steps:
npm run build
in original directory with source code..next
foldernext-build-artifacts
and put.next
folder intonext-build-artifacts
package.json
and runnpm i
npx next start
will throw an errorAlternative:
/home/ktl2/Projects-2025/nicer_so/product-nextjs/node_modules
with current directorynode_modules
path. Or create a script to map through all build files and replace this path.Proposal
or
next build --experimental-node-modules-path [runtime | compile-time]
Beta Was this translation helpful? Give feedback.
All reactions