Next.js Discord

Discord Forum

I'm having a problem deploying my app as per the tutorial instructions..

Unanswered
Pyrenean Mountain Dog posted this in #help-forum
Open in Discord
Pyrenean Mountain DogOP
[Chapter 6 of the NextJS Tutorial](https://nextjs.org/learn/dashboard-app/setting-up-your-database#connect-and-deploy-your-project) leads us to make a project in our nextjs account and connect to online repository. The application works fine locally (resolves and works in the browser) but the build fails in the project in nextjs account.

[Build Log](https://dpaste.org/nR3KF)

I tried commenting out line 25 in ./app/page.tsx but then I just get different errors.

Is this intentional so that it doesn't deploy while you are still working through the tutorial? Should I look for a way to stop the build server from running until I really want it to - or is there some way to manually deploy when you decide to do it?

Based on the way the first section of chapter 6 in the tutorial reads it seems like the application is supposed to deploy successfully as soon as you get everything connected. it says..

"Hooray! 🎉 Your project is now deployed."

which sounds like its supposed to deploy without issue.

https://dpaste.org/nR3KF
- - -

39 Replies

Pyrenean Mountain DogOP
yea one moment
hang on just saw the second request (will get that pasted)
there is no /app/login/page.tsx and it makes sense since we have not gotten to a point where it was instructed yet (I don't think so). Did I miss it? in chapters 1 - 5?
Yeah I just did a search of chapters 1 - 6 inclusive and the string "/app/login/page.tsx" does not appear in any of those chapters. So we would not have been instructed to do anything with that page (nor even create it) yet.
Pyrenean Mountain DogOP
It shows up for the first time in chapter 15
yes one moment
experimental: {},

it should build if you remove typedRoutes there
because you have enabled typedRoutes it will look for all route in building
Pyrenean Mountain DogOP
In a nutshell what does that do? Makes it look for the route as soon as you refer to it?
ahh
so remove the entire block and just leave an empty object in that file?
typesafey route
either remove typedRoutes: true or set it to false
Pyrenean Mountain DogOP
now I really broke it
as soon as I turn that to false esling (in vscode) complains about a parsing error - I might know what that is.

[{
"resource": "/home/jake/Projects/Software/Learning/NextJS/DashboardApp/nextjs-dashboard/DashboardApp/next.config.js",
"owner": "eslint",
"severity": 8,
"message": "Parsing error: Cannot find module 'next/babel'\nRequire stack:\n- /home/jake/Projects/Software/Learning/NextJS/DashboardApp/nextjs-dashboard/DashboardApp/node_modules/next/dist/compiled/babel/bundle.js\n- /home/jake/Projects/Software/Learning/NextJS/DashboardApp/nextjs-dashboard/DashboardApp/node_modules/next/dist/compiled/babel/eslint-parser.js\n- /home/jake/Projects/Software/Learning/NextJS/DashboardApp/nextjs-dashboard/DashboardApp/node_modules/eslint-config-next/parser.js\n- /home/jake/Projects/Software/Learning/NextJS/DashboardApp/nextjs-dashboard/DashboardApp/node_modules/@eslint/eslintrc/dist/eslintrc.cjs\n\nMake sure that all the Babel plugins and presets you are using\nare defined as dependencies or devDependencies in your package.json\nfile. It's possible that the missing plugin is loaded by a preset\nyou are using that forgot to add the plugin to its dependencies: you\ncan workaround this problem by explicitly adding the missing package\nto your top-level package.json.",
"source": "eslint",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 1
}]
and just follow the tutorial step by step
Pyrenean Mountain DogOP
Idk
I though I tried to remove the entire block first (leaving an empty object const nextConfig = {}
but got esling complaining. So I put it back and just changed `typedRoutes: true, totypedRoutes: false,` and got what I pasted above
I found the development server not running when I visited the command line so I started it. Going to localhost/3000 gives a perfectly working app (even though the eslint error is still there).
esling\eslint
@Ray I think you better clone the repo again https://github.com/vercel/next-learn/tree/main/dashboard/starter-example
I would suggest clone the repo again. should be easier than trying to fix it
Pyrenean Mountain DogOP
omg! What have I done!
ahh.. good idea
I literally copy the string to clone the repo off of of gitlab using the button to copy it. I paste it onto my command line and hit enter and I get the response git@gitlab.com:bithouz/learning/nextjs/dashboard-app.git: No such file or directory
I'm looking at the repo in gitlab!
Pyrenean Mountain DogOP
I don't prefer to lose 5 chapters of work I already did. git pull tells me my local copy is "Already up to date". Maybe the eslint stuff for that page was always there since I would not have seen eslint output for the page until I visited it and that just happened for the first time a moment ago.
If the app is working locally (resolves and works in the browser) then maybe I can just keep the deployment setting on nextjs account set to be off or don't deploy and just continue through the tutorial locally? Idk if having problems is going to prevent me from creating / using postgres via nextjs account (as per the upcoming instruction in chapter 6).
What if I create a new one with (what the code you gave would do) then add remote branch to the gitlab repo then do a git pull into the new default / unaltered project? Wouldn't that get me back to what outght to be right?
well except for the build errors but back to where I started with this question.
I'm gonna try that.. move existing project out of path locally then try what I described
Pyrenean Mountain DogOP
OH wow!