Next.js Discord

Discord Forum

output: 'standalone' output folder copies path of my cwd

Answered
aardani posted this in #help-forum
Open in Discord
I dont think this is supposed to be like this.

when doing output: "standalone", it generates a folder path that is unexpected: that is something like this:

[cwd]/my-project/.next/standalone/[cwd]/my-project.

I dont think its supposed to be like that in the previous version.

Any of you would like to help to confirm if this is an issue for you too or is it just me that is, if you do these followings it would also produce the same result:
1. create a fresh project
2. set output: "standalone" in next.config.ts
3. build the project
4. check .next/standalone project
Answered by aardani
i should've read this and pay attention to it. removing the parent package_lock.yaml fixes the issue.
View full answer

3 Replies

oh this is dumb.
next.js detected a parent package_lock.yaml
i should've read this and pay attention to it. removing the parent package_lock.yaml fixes the issue.
Answer