Skip to content
This repository has been archived by the owner on Feb 27, 2022. It is now read-only.

Error: Cannot find module 'Session/Client' #20

Closed
afrijaldz opened this issue May 15, 2018 · 4 comments
Closed

Error: Cannot find module 'Session/Client' #20

afrijaldz opened this issue May 15, 2018 · 4 comments

Comments

@afrijaldz
Copy link

I have a simple code to test REST Api use Authentication and my code is simple like

const { test, trait } = use('Test/Suite')('Role')
const UserModel = use('App/Models/User')

trait('Test/ApiClient')
trait('Session/Client')
trait('Auth/Client')

test('test role get all', async ({ client }) => {
  console.log('ok')
})

it throws error Error: Cannot find module 'Session/Client'.

how to install the module?

@RomainLanz
Copy link
Member

Hey @afrijaldz! 👋

If you tried to reinstall all your dependencies?
Also, could you tell us which package of @adonisjs you are using?

@afrijaldz
Copy link
Author

It's success when I comment trait('Session/Client')

here is the list of the packages

"@adonisjs/ace": "^5.0.1",
    "@adonisjs/auth": "^3.0.4",
    "@adonisjs/bodyparser": "^2.0.2",
    "@adonisjs/cors": "^1.0.5",
    "@adonisjs/fold": "^4.0.7",
    "@adonisjs/framework": "^5.0.5",
    "@adonisjs/ignitor": "^2.0.6",
    "@adonisjs/lucid": "^5.0.3",
    "@adonisjs/mail": "^3.0.5",
    "@adonisjs/validator": "^5.0.3",
    "@adonisjs/vow": "^1.0.15",
    "@adonisjs/websocket": "^1.0.9",

@RomainLanz
Copy link
Member

Have you tried to delete node_modules and reinstall your deps?

@afrijaldz
Copy link
Author

When I try with comment trait('Session/Client') it works, because I just want to test the API

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants