not generating dist folder
Answered
Minskin posted this in #help-forum
MinskinOP
I upgraded typescript version. .. ?
35 Replies
MinskinOP
damn it. problems everywhere ??
MinskinOP
That makes sense.
It's just a normal project.
I used the create npm template thing.
Command.
The Vercel hosting requires a dist folder.
I have a src folder. But the dist folder is not being generated automatically.
I looked up online for solutions. And I tried some. Like updating the project json versions.
@Minskin The Vercel hosting requires a dist folder.
how are you deploying your project to vercel?
I dont think they require a dist folder for nextjs project?
I dont think they require a dist folder for nextjs project?
MinskinOP
I put "git push -u origin main".
Then it deploys automatically.
But it says 404 not found. Because of the dist.
Then it deploys automatically.
But it says 404 not found. Because of the dist.
could you check and show the build log on vercel?
@Ray are you using nextjs?
MinskinOP
Yes. But the project was initially started without NextJS (on Vercel).
Then I deleted all github files and replaced them with the NextJS project.
Then I deleted all github files and replaced them with the NextJS project.
@Minskin Yes. But the project was initially started without NextJS (on Vercel).
Then I deleted all github files and replaced them with the NextJS project.
you get an error saying it is missing dist folder?
could you show the
could you show the
next.config.jsMinskinOP
/** @type {import('next').NextConfig} */
const nextConfig = {};
export default nextConfig;@Ray you get an error saying it is missing dist folder?
could you show the `next.config.js`
MinskinOP
There is no js but there is next.config.mjs
@Minskin There is no js but there is next.config.mjs
ok could you show the message where it is saying dist folder is required?
and can you build and run the project locally?
MinskinOP
Dist is the standard folder on Vercel. And it's running on localhost.
@Minskin Dist is the standard folder on Vercel. And it's running on localhost.
well I have never seen nextjs will build the output to a dist folder
unless you change it in
next.configplease show the error on vercel
or I have no idea
MinskinOP
No Output Directory named "dist" found after the Build completed. You can configure the Output Directory in your Project Settings.
or
404: NOT_FOUND
Code: NOT_FOUND
ID: fra1::c8cbl-1710981883709-70a49f803242
or
404: NOT_FOUND
Code: NOT_FOUND
ID: fra1::c8cbl-1710981883709-70a49f803242
MinskinOP
I've been there. I tried setting Override to "src" folder. It did not fix anything.
"dist" is the default for me
@Minskin I've been there. I tried setting Override to "src" folder. It did not fix anything.
no, just choose next.js as preset and don't override any thing
Answer
MinskinOP
Oh ! Oh !
@Ray could you go to vercel.app > your project > settings
like the screenshot here
MinskinOP
My mother told me to pay attention.. I am sorry..
Thanks a lot @Ray !
does it work now?
MinskinOP
Yes. Absolutely. I overlooked that pre-set !
nice