DEV Community

Discussion on: Build an E-Commerce website with MERN Stack - Part 1 (Setting Up the Project)

Collapse
 
blancout profile image
Edimilson Blanes Coutinho • Edited

Thanks @Kumar Shubham for your contribution ! I´m having problems when running server.js, follow the lines:

[nodemon] 2.0.7
[0] [nodemon] to restart at any time, enter rs
[0] [nodemon] watching path(s): .
[0] [nodemon] watching extensions: js,mjs,json
[0] [nodemon] starting node server.js
[0] C:\Curso_ECommerce\node_modules\config\lib\config.js:812
[0] throw new Error("Cannot parse config file: '" + fullFilename + "': " + e3);
[0] ^
[0]
[0] Error: Cannot parse config file: 'C:\Curso_ECommerce\config\default.json': SyntaxError: Unexpected token } in JSON at position 50

Any sugestions ?

Collapse
 
shubham1710 profile image
Kumar Shubham • Edited

I think your json file would have some trailing commas.
Sorry, I have put that comma in the config file because I will be adding more in that part like jwt swecret code and stripe api key.

Corrected it in this tutorial now.

You can look here for possible solutions:
stackoverflow.com/questions/549262...

Collapse
 
blancout profile image
Edimilson Blanes Coutinho

Reading the error more carefully, it is due to a key not yet specified: StripeAPIKey. I believe it will be defined in future articles.

Thanks Kumar!

Thread Thread
 
shubham1710 profile image
Kumar Shubham

Yes, the StripeAPIKey will be defined in the 4th tutorial when we will build the cart and orders API and handle payment via Stripe Checkout.
Thanks for reading! Hope you liked it!