upgrading the Next 14 from 11. How can I enable app directory?
Unanswered
Texas leafcutting ant posted this in #help-forum
Texas leafcutting antOP
I have an Next 11 app. I have upgraded to 14, but I am unable to get
I have created
It is my understanding that I should see an error because I already have
Could my custom express handlers be interfering?
app directory working alongside the pages routerI have created
app/page.tsx which just exports a simple component on defaultIt is my understanding that I should see an error because I already have
pages/index.tsx, but actually I just see pages/index.tsx renderedCould my custom express handlers be interfering?
11 Replies
you need to create app/layout.tsx also
Texas leafcutting antOP
@Ray done that, same result
just serves original page
App Router is enabled automatically, just remove the one in /pages and try again, perhaps a bug though
Texas leafcutting antOP
turns out the app router needs to conform to the
pageExtensions rule also. Feels like it would be good to be able to disable that for app routerTexas leafcutting antOP
it seems you also have to use it for things like layout
hmmm
this might get noisy
Shy Albatross
it's reasonable to expect the same to be true for app router
Texas leafcutting antOP
sure, it's reasonable, but also would be useful to be able to be specific. The only reason we use a differenent page extension is so we can so locate spec files