Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong deploy path in netlify.toml file #1948

Closed
vincanger opened this issue Apr 11, 2024 · 1 comment · Fixed by #2041
Closed

wrong deploy path in netlify.toml file #1948

vincanger opened this issue Apr 11, 2024 · 1 comment · Fixed by #2041
Assignees
Labels
bug Something isn't working deployment

Comments

@vincanger
Copy link
Contributor

vincanger commented Apr 11, 2024

A user reported an issue deploying to Netlify and I was able to recreate it with a fresh app.

wasp v0.13.1
netlify-cli/17.22.1

When trying to deploy the client to netlify it looks in the root of the project for the build folder rather than from .wasp/build/web-app

Adding local .netlify folder to .gitignore file...

Deploy path:        /Users/vincecanger/Documents/WASP/test/build
Configuration path: /Users/vincecanger/Documents/WASP/test/.wasp/build/web-app/netlify.toml
 ›   Error: The deploy directory "/Users/vincecanger/Documents/WASP/test/build" has not been found. Did you forget to run 'netlify build'?
web-app % 

to fix it, I had to change the deploy path in the toml file from:

[build]
  publish = "build/"

to this:

[build]
  publish = ".wasp/build/web-app/build/"
@Martinsos Martinsos added bug Something isn't working deployment labels Apr 11, 2024
@infomiho infomiho self-assigned this Apr 18, 2024
@infomiho
Copy link
Contributor

infomiho commented May 3, 2024

Some extra info: Netlify CLI finds the Git repository root folder and then goes down all the subdirs until it finds a package.json. This means it stops at the project root level since there is a package.json there now since 0.12.0.

Source: https://github.com/netlify/build/blob/007326ee4dc92e9b41e7f11f989bfefb54d582d5/packages/config/src/options/base.js#L4

The value needs to be updated to .wasp/build/web-app/build to work again (as this issue suggests).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants