Questions tagged [adonisjs-ace]

AdonisJS Ace is the command line component for AdonisJS.

Ace is command line framework embedded into AdonisJS for creating CLI commands.

The project is under active development at github.com/adonisjs/ace.

62 questions
4
votes
2 answers

Missing `pino-pretty` module: `pino-pretty` must be installed separately

I'm using a adonis js project version 5 and node js version 14 and docker version 20 when i build the application things goes normallly but when i create a docker image and run a container docker i got this error any help please thank you node…
sokida
  • 433
  • 1
  • 8
  • 21
3
votes
1 answer

Is there a way to squash migrations or baseline a database in Adonis Lucid?

I would like a way to generate migrations programmatically from an existing database in the Adonis ecosystem. Having to run 500 migrations, for example, during every test run is annoying and takes time, and I would like to squash migrations up to a…
Jordan Nelson
  • 453
  • 6
  • 17
3
votes
0 answers

node ace configure is not a registered command in Adonisjs

I've been given an adonisjs project that has the following package.json: { "name": "adonis-api-app", "version": "4.1.0", "adonis-version": "4.1.0", "description": "Adonisjs boilerplate for API server with pre-configured JWT", "main":…
John
  • 32,403
  • 80
  • 251
  • 422
3
votes
3 answers

how to create a path and query validation in adonis5

In adonis5 i am currently using schema based validation, but these validation is only applicable to request body . how i can validate path and query parameter validation import { rules, schema } from '@ioc:Adonis/Core/Validator' import {…
3
votes
1 answer

Adonis 5.0 TypeError: Cannot read property 'length' of undefined

I am trying to setup lucid on adonis 5.0 after installation using node ace invoke @adonisjs/lucid OS: windows 10 node version: 14.6.1 npx version: 6.14.12 Expected Result --Set up lucid Actual Result TypeError: Cannot read property 'length' of…
3
votes
0 answers

How to use the controller when working with sockets in AdonisJS

How to call the controller when I do emit in socket.io I want that when calling emit from the client the data is first saved in the db and then sent to it. My code: import SocketIO from '@ioc:Socket.IO' SocketIO.afterStart(() => { const io =…
2
votes
1 answer

How to use Hash.make(user.password) in adonisjs

Trying to encrypt a user password using Hash.make(user.password) from import Hash from '@ioc:Adonis/Core/Hash' The problem happens when the code tries to execute the Hash.make present inside @beforesave it gives me a referenceError. message:'Hash is…
Cesarvspr
  • 301
  • 3
  • 9
2
votes
2 answers

How to get separated auth for admin and user models in Adonis JS

Is it possible to have separated Auth for different models in Adonis Js? I have two different table for admins and users and want to have separated Auth. How can I setup this in adonis js ?
Biswa
  • 479
  • 7
  • 11
2
votes
1 answer

Adonisjs 5.0 TypeError: this.container.singleton is not a function

I just installed the adonis5-scheduler on adonisjs5 and I am getting an error anytime I try to serve OS: windows 10 node version: 14.6.1 npx version: 6.14.12 Expected result --Build Serve Actual result TypeError: this.container.singleton is not a…
Ubani Uche
  • 51
  • 5
2
votes
0 answers

Many to Many query on Lucid models, AdonisJs

Consider a simple situation of users and subjects related with a pivot table named user_subjects, now if I have to fetch all the users who have opted for a certain subject. What is the best way to achieve this in AdonisJs 5. Following is the…
Kushagra Saxena
  • 671
  • 5
  • 17
2
votes
2 answers

How can I solve a crash in an Adonis app starting?

this is my first question ever. I'm trying to run an Adonis.js app by entering adonis serve --dev at the terminal. The messages are always the same in this succession: SERVER STARTED Watching files for changes... Fatal error in , line 0 Check…
2
votes
2 answers

Adonis 5 "make:migration command not found" any idea?

i read the basic documentation of new Adonis Js5, i make a new api serve and i compile the code with "node ace serve --watch" or "node ace build --watch" and always is the same "make:migration command not found" any idea for fix?
Gario3
  • 139
  • 2
  • 13
1
vote
0 answers

AdonisJS 5 Dockerfile - Cannot find ace

I have a docker setup with AdonisJS 5. I'm currently trying to get it started (and it builds just fine). But as discussed a bit further down, the ace command cannot be found. ace is the CLI package for AdonisJS (think ng for Angular) This is my…
1
vote
1 answer

How to load only existing preload data in adonis js

I am working in adonis js I have a relation between my category table and my dishes table but when i preload dishes it loads dishes which have empty relation as well const data = await Category .query() .preload('dishes',(builder)=>{ …
rahul modi
  • 31
  • 4
1
vote
1 answer

Multiple statements on a single query with Adonisjs

I'd like to pass a several statements on a single line query. It's possible? const sql = 'update table set column where id = ?; delete from table where id = ? delete from table where id = ? select * from table…
1
2 3 4 5