Error at mongo_client.js
-
Re: Getting error during installation
Hello, i am trying to install on my macosx 10.9.5 the NodeBB 0.9.2 with MongoDB in order to run smoothly with the nodebb-plugin-import. The plugin needs the 0.9.2 and it is not compatible with newer versions so that's why i try to install such an old version of NodeBB. My latest attempt is with mongodb 2.4.14
I got the following error:
[email protected] node_modules/mongodb
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected])
/Users/perarg/NodeBB/node_modules/mongodb/lib/mongo_client.js:444
throw err
^TypeError: _.assign is not a function
at new MongoStore (/Users/perarg/NodeBB/node_modules/connect-mongo/lib/connect-mongo.js:114:19)
at /Users/perarg/NodeBB/src/database/mongo.js:111:27
at /Users/perarg/NodeBB/node_modules/mongodb/lib/mongo_client.js:441:15
at nextTickCallbackWith0Args (node.js:453:9)
at process._tickCallback (node.js:382:13)Do you have any idea how to solve this ?
-
@nhl.pl
My first try was with the latest mongoDB with exactly the same issue. I thought that the 0.9.2 was quite old for the MongoDB 3.x so I tried the oldest version that I could try, that is 2.4.x ...
I am afraid something else may happens... In my office i use 10.9.5 and I am having this issue. In my home mac I use 10.7.5(quite old) and it works without any issue... -
it's not mongo, i think it's this
https://github.com/kcbanner/connect-mongo/issues/206 -
If i manually reach into the
.../..../...../connect-mongo/package.json
and change the lodash dependency to"^3.0.0"
it works -
However, this is NO longer an issue with NodeBB 1.x since it's not using connect-mongo 1.x
https://github.com/NodeBB/NodeBB/blob/0823cd94331a99b5c6ae5c696cd30215295f3a4c/package.json#L25it was an issue with 0.9.2.
https://github.com/NodeBB/NodeBB/blob/v0.9.2/src/install.js#L16