Skip to content

"out" directory does not exist #373

@gragland

Description

@gragland

Describe the bug
When attempting to deploy manually with netlify deploy I get the error:

Error: No such directory /Users/gaberagland/projects/next-netlify/out! Did you forget to run a build?

It appears this is because next build stores all build files in the .next directory, not out. The out directory is only generated when running next export, but the readme specifically says not to use next export.

To Reproduce
Steps to reproduce the behavior:

  1. Start a new Next.js project
  2. Add the netlify.toml file from the readme
  3. Make sure the build script in your package.json calls next build
  4. Run npm run build
  5. Run netlify deploy

Versions

  • Next.js: 10.2.3
  • plugin (if installed at fixed version): 3.3.1

If you're using the CLI to build

  • OS: [e.g. macOS, Windows] macOS
  • netlify/cli version: 3.31.16

If you're using file-based installation

  • netlify.toml:
[build]
  command = "npm run build"
  publish = "out"

[[plugins]]
  package = "@netlify/plugin-nextjs"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions