Skip to content

Error creating publish and functions directories for production build #141

Closed
@MikeM2343

Description

@MikeM2343

Describe the bug

  1. The build fails on the netlify server saying that the Web/out_functions and Web/out_publish directories do not exist
  2. The netlify build process never finishes (stays at "building"), requiring you to "Cancel Deploy"

To Reproduce
Steps to reproduce the behavior:

  1. Mono repo containing libraries and the main web app
  2. Trigger the deploy that runs a script in the root of the repo that builds the libraries and then builds the main Next app

Expected behavior
The app builds without any errors

Versions

  • Next.js: 10.0.8
  • plugin (if installed at fixed version): 3.0.3

If you're using file-based installation
**netlify.toml: **

[build]
  command   = "yarn lerna run build"
  functions = "Web/out_functions"
  publish   = "Web/out_publish"

[dev]
  functions = "Web/out_functions"
  publish   = "Web/out_publish"
  autoLaunch = false
  command = "yarn run dev"
  targetPort = 3000
  framework = "#custom"

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

Failed Build file
NetlifyBuild.log

Hello,

I'm not sure I have the correct netlify.toml configuration for the monorepo. I'm pretty sure I shouldn't be specifying a base directory because I need to run a script to build both my libraries and the main app from the root of the repo.

Is there any way to test this locally? I know that when using next-on-netlify, and doing a build, the out_publish and out_functions directories were created on my local system.

Thanks,
Mike

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