lumber icon indicating copy to clipboard operation
lumber copied to clipboard

MongoError - "invalid for/in left-hand side"

Open jordymalonda opened this issue 4 years ago • 3 comments

Expected behavior

Generate new project

Actual behavior

Cannot creating with mongo error `> Cannot generate your project.

An unexpected error occured. Please create a Github issue with following error: { MongoError: SyntaxError: invalid for/in left-hand side : functionExpressionParser@src/mongo/scripting/mozjs/mongohelpers.js:48:25

at Connection.<anonymous> (/usr/lib/node_modules/lumber-cli/node_modules/mongodb/lib/core/connection/pool.js:466:61)
at Connection.emit (events.js:198:13)
at processMessage (/usr/lib/node_modules/lumber-cli/node_modules/mongodb/lib/core/connection/connection.js:364:10)
at Socket.<anonymous> (/usr/lib/node_modules/lumber-cli/node_modules/mongodb/lib/core/connection/connection.js:533:15)
at Socket.emit (events.js:198:13)
at addChunk (_stream_readable.js:287:12)
at readableAddChunk (_stream_readable.js:268:11)
at Socket.Readable.push (_stream_readable.js:223:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

ok: 0, errmsg: 'SyntaxError: invalid for/in left-hand side :\nfunctionExpressionParser@src/mongo/scripting/mozjs/mongohelpers.js:48:25\n', code: 139, codeName: 'JSInterpreterFailure', name: 'MongoError', [Symbol(mongoErrorContextSymbol)]: {} } `

TODO: Please provide any relevant information about your setup.

  • Lumber Package Version: 2.6.2
  • Database Dialect: Mongodb
  • Database Version: v4.0.13

jordymalonda avatar Dec 12 '19 10:12 jordymalonda

Hi Jordy,

Where is located your mongo, is it a mongo atlas for example or do you host it?

Regards

slimee avatar Dec 12 '19 13:12 slimee

mongodb is on my local machine

jordymalonda avatar Dec 13 '19 05:12 jordymalonda

Are you on MongoAtlas ? Which version of NodeJs are you using ?

VincentMolinie avatar Dec 13 '19 09:12 VincentMolinie