Failed to load resource: the server responded with a status of 404 ()
@KarlosMrez-e1s Жыл бұрын
I did it like you in video, but when I go to the adress, I recieve an "Cannot GET /" Do you know why I can't see the angular page?
@jonathancosta93989 ай бұрын
did you solve this problem?
@zarkosuncevica37178 ай бұрын
@@jonathancosta9398 Problem is BASE URL should be "" when its production (const BASE_URL = environment.production? '' : 'localhost:5000';) and and server.js he added some code (app.use(express_1.default.static('public')); app.get('*', function (req, res) { res.sendFile(path_1.default.join(__dirname, 'public', 'index.html')); });) U need to add this ( "outputPath": "../backend/built/public",) in angular.json Frontend folder inside "options"
@zarkosuncevica37178 ай бұрын
@@jonathancosta9398 Problem is u need to Change BaseURL for production to be "" and aswell add FileReplacements in angularJS Production: and also add "outputPath" in options and add 2 lines of code in server.js where he set express.static
@zehankhan801 Жыл бұрын
I got error like this Mar 24 05:34:04 AM Build at: 2023-03-24T00:04:04.854Z - Hash: 97777e51d5dafbcc - Time: 28200ms Mar 24 05:34:08 AM ==> Uploading build... Mar 24 05:34:08 AM ==> Build folder npm start does not exist! Mar 24 05:34:08 AM ==> Build failed 😞
@CodeWithNasir Жыл бұрын
Send you Project's Github link here to check
@zehankhan801 Жыл бұрын
@@CodeWithNasir thanks for your reply now it is deployed.
@matthew22ibrahim22 Жыл бұрын
Website is live but all Im getting is ''Cannot GET /''
@stacknewbie3815 Жыл бұрын
How are your routes setup...the server might not know which files are suppossed to be served when the "/" route is accessed
@brunojacby Жыл бұрын
did you solve this problem?
@Vinchiii18227 ай бұрын
same issue
@codelikebeast39715 ай бұрын
@@Vinchiii1822 Add any route after the url while running on the browser
@Vinchiii18227 ай бұрын
Having this error when deploying in Render: Error: Cannot find module '/opt/render/project/src/backend/built/server.js' Someone pls help? Thanks
@farahazeem46442 жыл бұрын
Also I noticed a problem in the project, the cart is not associated with particular user e.g. you logged in as a user, add some items in the cart, logged out, then login again as a different user, can still see the items in the cart add by previous user. Do you think it has to be addressed as well?
@luczztem2 жыл бұрын
I also noticed that. I kinda like that he left some things undone, it encourages us to do it ourselves
@CodeWithNasir Жыл бұрын
Yes you are right, I think it's better to do it by yourself, as a quick help, you can use the user id as the key for the local storage, right after the login
@DragosP-cx7sk8 ай бұрын
@@CodeWithNasir anyone managed to do that?
@bolarinwadamilare3789 Жыл бұрын
Hello Nasir, thank so much for the complete foodmine project I realy leant alot from it as a beginner.... Can you pls work on a taxi booking web app like uber with angular and node js
@CodeWithNasir Жыл бұрын
Noted
@harsimarjitsingh8270 Жыл бұрын
@@CodeWithNasirplease do, and thanks for such a beautiful course!!
@quantumCollapses Жыл бұрын
This is the cleverest tutorial. Thanks
@shade8103 Жыл бұрын
Nasir bro, When you created that folder in backend/built and whats inside and i wanna learn how to create that global package.json inside your app outside of backend and frontend folder i need it urgently
@nasirjdd Жыл бұрын
the build command inside the package.json file in the backend folder will run "npm install && tsc". TSC compiles all TypeScript files into JavaScript and puts them into the "outDir": "./built" set inside the tsconfig.json file in the backend. We set it to "./built" so that it goes to the built folder. You can set it to any other folder name you want, but when you start the project, you need to go to that specific folder. For your second question, you just need to open a new terminal. By default, it is inside the root folder. Then, write "npm init -y" to create a new package.json file. You can modify it and add all the scripts you want.
@dhinesha778 Жыл бұрын
iam getting error on render May 3 06:49:45 PM npm ERR! enoent ENOENT: no such file or directory, open '/opt/render/project/src/package.json' May 3 06:49:45 PM npm ERR! enoent This is related to npm not being able to find a file. May 3 06:49:45 PM npm ERR! enoent May 3 06:49:45 PM May 3 06:49:45 PM npm ERR! A complete log of this run can be found in: May 3 06:49:45 PM npm ERR! /opt/render/.cache/_logs/2023-05-03T13_19_45_606Z-debug-0.log May 3 06:49:45 PM ==> Build failed 😞 May 3 06:49:45 PM ==> Generating container image from build. This may take a few minutes...
@matthew22ibrahim22 Жыл бұрын
I have same problem were you able to fix it?
@laxmikantc328 Жыл бұрын
I am facing this error Error: Cannot find module '/opt/render/project/src/backend/built/server.js' Mar 17 09:45:45 PM at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15) Mar 17 09:45:45 PM at Module._load (node:internal/modules/cjs/loader:920:27) Mar 17 09:45:45 PM at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) Mar 17 09:45:45 PM at node:internal/main/run_main_module:23:47 { Mar 17 09:45:45 PM code: 'MODULE_NOT_FOUND', Mar 17 09:45:45 PM requireStack: [] Mar 17 09:45:45 PM } Mar 17 09:45:45 PM Mar 17 09:45:45 PM Node.js v18.15.0 while deploying the code to the render.com, Please help me with this issue
@CodeWithNasir Жыл бұрын
Try running following commands on your vscode terminal (if you are on windows select git bash as your terminal's profile): npm run prebuild npm run build cd backend/built ls Copy the result here
@shivaniadimulam6796 Жыл бұрын
Thank you...its helpful!!!
@georgeak4454 Жыл бұрын
hey Code With Nasir can u help me please with render, I'm trying to upload my site but I'm getting an error
@CodeWithNasir Жыл бұрын
Hello Brother, Can you copy the error you are getting?
@georgeak4454 Жыл бұрын
@@CodeWithNasir I got this error npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\gougo\AppData\Roaming pm-cache\_logs\2023-04-11T20_24_08_494Z-debug.log
@CodeWithNasir Жыл бұрын
@@georgeak4454 Isn't there anything more informative?
@georgeak4454 Жыл бұрын
@@CodeWithNasir sorry after I doing npm run build I got this, maybe I need to install something? npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the tset@ prebuild script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install? npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\gougo\AppData\Roaming pm-cache\_logs\2023-04-11T20_33_05_859Z-debug.log
@CodeWithNasir Жыл бұрын
@@georgeak4454 Do you get this error on the heroku logs?
@egistbalegistbal7720 Жыл бұрын
Hello,could you please upload more often new lecture videos to your channel?Thanks.
@stacknewbie3815 Жыл бұрын
Thanks!
@gamingbeast71011 ай бұрын
awsom thx
@CodeWithNasir11 ай бұрын
You're welcome!
@kimmiev2114 Жыл бұрын
I personally used render (I previously had depoloyed on heroku) for my website and it works great and is super easy!
@CodeWithNasir Жыл бұрын
Yes off course, I definitely see that it's faster than Heroku, especially on hooking the new commits and starting deployment, and it has a free plan for beginners too