Ability to use /app as route in app directory
Answered
Jumbo flying squid posted this in #help-forum
Jumbo flying squidOP
What do I want?
Having /app as an actual route in my webapp.
Issue
Having an app folder inside the /app directory gives some weird errors during build time.
I assume it is because this name is somehow reserved. Anyone experience with this or a solution to make this work?
Having /app as an actual route in my webapp.
Issue
Having an app folder inside the /app directory gives some weird errors during build time.
I assume it is because this name is somehow reserved. Anyone experience with this or a solution to make this work?
45 Replies
@Jumbo flying squid **What do I want?**
Having /app as an actual route in my webapp.
**Issue**
Having an app folder inside the /app directory gives some weird errors during build time.
I assume it is because this name is somehow reserved. Anyone experience with this or a solution to make this work?
I have this pattern a for multi tenant app right now and it works fine. Can you clarify
... some weird errors during build time.
Jumbo flying squidOP
Hmm thats odd, good to know it might be related to my project. I will check the errors when I’m home 🙂
Jumbo flying squidOP
@B33fb0n3 It seems related to the combination of using
/app, Mantine (https://mantine.dev/) and Docker for building the appThis gives the error
Error: @mantine/core: MantineProvider was not found in component tree, make sure you have it in your appas soon as I call my
/app route something else this error goes away.However not sure this issue belongs on this discord then, but I have no clue where to go as I imagen Mantine will say its a nextjs issue
@Jumbo flying squid <@301376057326567425> It seems related to the combination of using `/app`, Mantine (https://mantine.dev/) and Docker for building the app
Great golden digger wasp
why the hell you use mantine when we have daisyUI
Jumbo flying squidOP
Seems like a personal preference and not sure how this is added value to this issue
@Jumbo flying squid Seems like a personal preference and not sure how this is added value to this issue
Great golden digger wasp
I was just saying that a ui library like mantine can be unstable in some instances and daisyUI is a better easy to use a fully stable ui library. Still some j queary developers use mantine.
Jumbo flying squidOP
Don't see any reason why mantine would be considered unstable lol.
@Jumbo flying squid **What do I want?**
Having /app as an actual route in my webapp.
**Issue**
Having an app folder inside the /app directory gives some weird errors during build time.
I assume it is because this name is somehow reserved. Anyone experience with this or a solution to make this work?
Great golden digger wasp
mantine is unstable that's why you are getting this error it clashes with next js
fool
the discussion on why mantine is bad or good is irrelevant to the question. the error here is due to a user code bug, not due to mantine.
Great golden digger wasp
user is itself a bug.
@Jumbo flying squid so it looks like you need to use mantine provider in the root of the application. did you use it in the root layout?
Jumbo flying squidOP
This is in the root layout
Also, I have 0 issues when building locally without Docker
I've also opened a ticket on Mantine's repo, as I'm not sure where the issue lies
Nextjs bundler, mantine's error handling or Docker doing some funky stuff under the hood
does it somehow work if you use, say,
foo instead of app?Jumbo flying squidOP
Interesting, lemme check
ah wait, yea it does
because to temp fix it I renamed
app to appp just so I could get my CI/CD goingwha-, so only
app fails?Jumbo flying squidOP
yep
thats where it is very odd
could you make a reproduction repository? so i can have a look
Jumbo flying squidOP
Hmm, I'll try
Just need to strip out some code
@Jumbo flying squid Click to see attachment
Great golden digger wasp
hey you are using a light theme you are not a programmer go and learn scratch.

Jumbo flying squidOP
Again, if you have no added value please leave this conversation.
>>strike 1 1164502113204850788 being intentionally disruptive and unhelpful in the forum
Jumbo flying squidOP
yarn build worksrunning
docker build . doesnt and gives the errorAnswer
Jumbo flying squidOP
Well that seems to work! very odd tho how that would intervene, that would mean that mantine just checks for /app/ directory or something? Atleast I'd assume its a mantine issue
@Jumbo flying squid Well that seems to work! very odd tho how that would intervene, that would mean that mantine just checks for /app/ directory or something? Atleast I'd assume its a mantine issue
no it seems you are just running the scripts in the dockerfile in the wrong directory
Jumbo flying squidOP
Ahh I see now!
It's the combination between WORKDIR /app and COPY ./ ./ ?
i am not too sure, i don't use docker myself. but that's the only point where the docker behaviour could differ from the normal
yarn build behaviour, and after googling WORKDIR i was convinced that it is indeed the issueJumbo flying squidOP
I'll do some research myself to find out what exactly is going on, but atleast I know what the issue is.
Thanks for the help!
Thanks for the help!
you're welcome