Git Product home page Git Product logo

bestbags-nodejs-ecommerce's Issues

HI! i found this error how can i solve

TypeError: C:\Users\vaish\bestbags-nodejs-ecommerce\views\shop\home.ejs:52
50| <% for(let i=0; i<3; i++){ %>
51|

52|
53| category
54|

<%=categories[i].title%>


55|

Cannot read property 'slug' of undefined
at eval (eval at compile (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:633:12), :109:39)
at returnedFn (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:668:17)
at tryHandleCache (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:254:36)
at View.exports.renderFile [as engine] (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:485:10)
at View.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\view.js:135:8)
at tryRender (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:640:10)
at Function.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:592:3)
at ServerResponse.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\response.js:1008:7)
at C:\Users\vaish\bestbags-nodejs-ecommerce\routes\index.js:20:9
at processTicksAndRejections (internal/process/task_queues.js:97:5)

Installation Guide

Hi,
I check this eCommerce code but here some issues coming so you need to describe proper installation guide also so that anybody can setup it on his local system easily and can contribute for this code.
Thanks

Mongodb connect issue

Can you please provide a bit brief on how to create .env file and connect mongo db.. if there is any sample.

I cant able to fill MongoDB Atlas database.

I cant able to fill the MongoDB database that you have mentioned to do "you need to navigate to the "seedDB" folder and run "node category-seed.js" and "node products-seed.js" " .
It is showing like this error

image

i have a issue when access link heroku of your

Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail

The index path corresponding to the specified order-by item is excluded

Hi, so I connected the app to azure cosmos DB NodeJS API. AdminBro works alright but I whenever I try to access the front page I get the following error.

GET / 302 685.380 ms - 46
MongoError: Error=2, Details='Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df; Reason: (Message: {"Errors":["The index path corresponding to the specified order-by item is excluded."]}
ActivityId: 77760ca9-a44a-49d1-93fc-c61413d5c5df, Request URI: /apps/a4038f59-dbab-454f-982e-c3c4ff0515f8/services/302463b7-7d21-4aa9-8c6a-1e7f8bc1c398/partitions/53e82a5d-f5cc-472f-83ae-6e4712cf3538/replicas/132878310044987400s/, RequestStats: Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum, SDK: Windows/10.0.19041 cosmos-netstandard-sdk/3.18.0);););
at MessageStream.messageHandler (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\connection.js:299:20)
at MessageStream.emit (node:events:390:28)
at processIncomingData (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\message_stream.js:144:12)
at MessageStream._write (C:\node-js-projects\farmtopot\node_modules\mongodb\lib\cmap\message_stream.js:42:5)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at MessageStream.Writable.write (node:internal/streams/writable:334:10)
at TLSSocket.ondata (node:internal/streams/readable:754:22)
at TLSSocket.emit (node:events:390:28)
at addChunk (node:internal/streams/readable:315:12)
at readableAddChunk (node:internal/streams/readable:289:9)
at TLSSocket.Readable.push (node:internal/streams/readable:228:10)
at TLSWrap.onStreamRead (node:internal/stream_base_commons:199:23) {
ok: 0,
code: 2,
codeName: 'BadValue'
}
GET / 302 630.101 ms - 46

Date format

Hi! @maryamaljanabi I want to change dateformat as 'yyyy/mm/dd' but I couldnt find where I have to do this changing. Could you help me please!

Schemas missing "_id" field - Readme.md

The schemas have a good representation, but the "_id" field isn't there(I know that "_id" field is automatically created by MongoDB ). It is important to have a full description of your schemas even if the field it's not fully explicit, in case anyone wants to have an overview about the project.

Add SECURITY.md

Hey there!

I belong to an open source security research community, and a member (@ktg9) has found an issue, but doesn’t know the best way to disclose it.

If not a hassle, might you kindly add a SECURITY.md file with an email, or another contact method? GitHub recommends this best practice to ensure security issues are responsibly disclosed, and it would serve as a simple instruction for security researchers in the future.

Thank you for your consideration, and I look forward to hearing from you!

(cc @huntr-helper)

cant find

hi , please help to me to fix
image
i cant fix this were i should give , i have done my try

Replacing Products

I've been playing around with this for a few days now, I was wondering how I would go about removing faker and replacing with real products to down the line have on a live site.

sign in problem

Hi! @maryamaljanabi I can sign up succesfully but after sign in ,right up corner Icant see user name and cant add product to cart one more thing when I try to sign in I tried wrong email and password it dont show error messages
Thanks for help!

Security Solution

Hi, thanks for sharing the source code. I can see a CSRF prevention set up for this, so do you use any other security solutions? Thanks.

Mongo DB URI Credentials

Hi

How do i provide credentials in the .env file as my Mongo DB requires Authentication

Regards

Routing to app.js file

Hi! @maryamaljanabi I want to do routing operation inside pages.js to app.js=>
routing

but in app.js I cant use products it returns me this error
error

How can I fix it? is it possible to route app.js?

Secret option issue

Hi! when I start the app with npm start it returns me that and not upload the website

express-session deprecated undefined resave option; provide resave option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated undefined saveUninitialized option; provide saveUninitialized option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated req.secret; provide secret option node_modules\admin-bro-expressjs\plugin.js:176:14
express-session deprecated req.secret; provide secret option app.js:34:3

how can I fix it?

notice module

Hi @maryamaljanabi I created a notice module for carousel, first created model file and then created notices.js in routes directory I want to use variable that returns from notices.js file in home.ejs but it returns me error when I use variable
here is my code and error message thanks for help

homeejs
error
routes

Cannot read property 'slug' of undefined

I'm getting this error in home.ejs. How can I solve it?

TypeError: C:\Users\vaish\bestbags-nodejs-ecommerce\views\shop\home.ejs:52
    50|     <% for(let i=0; i<3; i++){ %>
    51|     <div class="col-lg-3 col-md-3 col-sm-12 text-center ml-2">
 >> 52|       <a class="title-link" href="/products/<%=categories[i].slug%>">
    53|         <img src="images/dept<%=i%>.jpg" alt="category" class="circle-img" />
    54|         <h4 class="mb-3 mt-3"><%=categories[i].title%></h4>
    55|       </a>

Cannot read property 'slug' of undefined
    at eval (eval at compile (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:633:12), <anonymous>:109:39)
    at returnedFn (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:668:17)
    at tryHandleCache (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:254:36)
    at View.exports.renderFile [as engine] (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\ejs\lib\ejs.js:485:10)
    at View.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\view.js:135:8)
    at tryRender (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:640:10)
    at Function.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\application.js:592:3)
    at ServerResponse.render (C:\Users\vaish\bestbags-nodejs-ecommerce\node_modules\express\lib\response.js:1008:7)
    at C:\Users\vaish\bestbags-nodejs-ecommerce\routes\index.js:20:9
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.