node-react-ecommerce
node-react-ecommerce copied to clipboard
babel_parse_error
when i try to run the server i get this error

SyntaxError: C:\Users\no one\Desktop\root3\myWeb\backend\server.js: Unexpected token (15:21)
13 | const mongodbUrl =config.MONGODB_URL; 14 | mongoose.connect(mongodbUrl, {
15 | useNewUrlParser = true, | ^ 16 | useUnifiedTopology: true, 17 | useCreateIndex: true, 18 | }).catch(error => console.log(error.reason)); at Parser._raise (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:746:17) at Parser.raiseWithData (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:739:17) at Parser.raise (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:733:17) at Parser.unexpected (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:8807:16) at Parser.checkExpressionErrors (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:8905:12) at Parser.parseMaybeAssign (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9469:12) at Parser.parseExprListItem (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:10792:18) at Parser.parseCallExpressionArguments (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9850:22) at Parser.parseSubscript (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9750:31) at Parser.parseSubscripts (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9679:19) { loc: Position { line: 15, column: 21 }, pos: 407, code: 'BABEL_PARSE_ERROR' } [nodemon] app crashed - waiting for file changes before starting...
It happens locally or just when you are publishing on heroku?
On Tue, Jun 2, 2020 at 11:56 PM O-mrabet [email protected] wrote:
SyntaxError: C:\Users\no one\Desktop\root3\myWeb\backend\server.js: Unexpected token (15:21)
13 | const mongodbUrl =config.MONGODB_URL; 14 | mongoose.connect(mongodbUrl, {
15 | useNewUrlParser = true, | ^ 16 | useUnifiedTopology: true, 17 | useCreateIndex: true, 18 | }).catch(error => console.log(error.reason)); at Parser._raise (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel \parser\lib\index.js:746:17) at Parser.raiseWithData (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:739:17) at Parser.raise (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel \parser\lib\index.js:733:17) at Parser.unexpected (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:8807:16) at Parser.checkExpressionErrors (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:8905:12) at Parser.parseMaybeAssign (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9469:12) at Parser.parseExprListItem (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:10792:18) at Parser.parseCallExpressionArguments (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9850:22) at Parser.parseSubscript (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9750:31) at Parser.parseSubscripts (C:\Users\no one\Desktop\root3\myWeb\node_modules@babel\parser\lib\index.js:9679:19) { loc: Position { line: 15, column: 21 }, pos: 407, code: 'BABEL_PARSE_ERROR' } [nodemon] app crashed - waiting for file changes before starting...
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/basir/node-react-ecommerce/issues/30, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUFQ74EVYHP2SMBOJSQZLRUVG5PANCNFSM4NRAJ2FQ .
it happens locally
compare your code with this: https://github.com/basir/node-react-ecommerce/commit/413eac0250c587719de78d37f5c0efb890284ab8#diff-e56633f72ecc521128b3db6586074d2c
On Wed, Jun 3, 2020 at 12:25 PM O-mrabet [email protected] wrote:
it happens locally
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/basir/node-react-ecommerce/issues/30#issuecomment-638028160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUFQ4ENGLGAB7QANGYMVDRUX6XHANCNFSM4NRAJ2FQ .
its the same
exept for the server cuz u changed it later in the course
in line 15 instead of = use :
What do i do instead of use
instead of the equal sign(=) use colon(:).
IT WORKED! Thank You So Much
you are welcome
On Wed, Jun 3, 2020 at 4:26 PM O-mrabet [email protected] wrote:
IT WORKED! Thank You So Much
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/basir/node-react-ecommerce/issues/30#issuecomment-638149282, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATUFQ76IKXQ4J5YZDVBNXDRUY3APANCNFSM4NRAJ2FQ .