BodyParser UNMET PEER DEPENDENCY request & router

#1

Hi.
I have cloned my project to a new PC and after I run ‘npm update’ I get this message:

adonis-api-app@4.1.0 /home/jorge/Dropbox/redemp/code/redemp-api
├── @adonisjs/ace@5.0.8 
├── @adonisjs/auth@3.0.7 
├── @adonisjs/bodyparser@2.2.5 
├── @adonisjs/cors@1.0.7 
├── @adonisjs/drive@1.0.4 
├── @adonisjs/fold@4.0.9 
├── @adonisjs/framework@5.0.13 
├── @adonisjs/ignitor@2.0.8 
├── @adonisjs/lucid@6.1.3 
├── UNMET PEER DEPENDENCY @adonisjs/request@1.x
├── UNMET PEER DEPENDENCY @adonisjs/router@1.x
├── @adonisjs/session@1.0.28 
├── @adonisjs/shield@1.0.8 
├── @adonisjs/validator@5.0.6 
├── @adonisjs/websocket@1.0.11 
├── @radmen/adonis-lucid-soft-deletes@0.1.2 
├── adonis-scheduler@3.0.2 
├── fs-extra@7.0.1 
├── hashids@1.2.2 
├── mysql@2.17.1 
├── mz@2.7.0 
├── sharp@0.22.1 
└── slugify@1.3.4 

npm WARN @adonisjs/bodyparser@2.2.5 requires a peer of @adonisjs/request@1.x but none was installed.
npm WARN @adonisjs/bodyparser@2.2.5 requires a peer of @adonisjs/router@1.x but none was installed.

I install them

$ adonis install @adonisjs/router
$ adonis install @adonisjs/reuter
$ npm update

Then I try to seed Users and I got the following message:

Error: Cannot find module '@adonisjs/bodyparser/providers/BodyParserProvider'

What can be the problem?

0 Likes

#2

Run:

npm i --save adonis-bodyparser

And add this in start/app.js:

const providers = [
  ...
  'adonis-bodyparsers/providers/BodyParser'
]
0 Likes