Skip to content

Inconsistent working directory between nuxt dev, nuxt preview, node .output/server/index.mjs and node server/index.mjs #1368

Description

@dword-design

The working directory when running Nuxt seems to be inconsistent. While nuxt dev runs at project root, nuxt preview runs in .output subpath. At the same time though, the nuxt preview doc says that for prod you should run node .output/server/index.mjs, which again runs at project root. nuxt preview command itself recommends to run node server/index.mjs, which is inside .output (and inconsistent with the above-linked docs).

For me it feels right to always run it at project root and to have a data path for uploads and stuff there.

I'm thinking if it makes sense to implement the project with having nuxt preview in mind or just ignoring the special behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions