Mongoskin and mongoose dependency error

I am new to the full javascript stack and have long been stuck with this error. First, I saw this when running "npm-install":

npm WARN EPEERINVALID mongoskin@1.4.13 requires peer mongodb @ ~ 1.4 but no one has been installed.

when i do nodemon server.js i get the following error:

/Users.../node_modules/ Agenda / node_modules / mongoskin / lib / utils.js: 33 var skinClassName = 'Skin' + NativeClass.name; ^

TypeError: unable to read the 'name' property from undefined on makeSkinClass (/ Users / ....)

I saw that this is also a problem for others: https://github.com/kissjs/node-mongoskin/issues/153

but I'm really not sure how to proceed. Which package.json file (and where) should I edit and for what reason? I do not have a "monk" in my npm_modules folder.

+4
source share
3 answers

it is fixed! you need npm to install mongodb in the project directory and specify the version.

https://github.com/Automattic/monk/issues/91

+9
source

Add this line to package.json and run "npm install" again in the project directory. It will reinstall / downgrade mongodb to version 1.4.4, and "mongoskin" will install fine ...

    "mongodb": "^1.4.4",
+2
source

, MongoDb. :

  • npm uninsatll mongodb --save

  • npm install mongodb@1.4 --save

  • npm install monk --save

, !

0

Source: https://habr.com/ru/post/1611860/


All Articles