Developing a custom framework for Netlify Dev

I am trying to develop a framework that can work with Netlify Dev.
My framework starts a dev server on port 3000.
This is my netlify.toml:

 [dev]                                          
   framework = "#custom"                                                    
   command = "yarn dev"             
   targetPort = 3000
   debug = true
   port = 8888
   publish = "dist"

First thing I notice, all the logs from my frameworks are chopped. The first part - around 20 characters - are missing.
Second thing, Netlify Dev actually log only the first lines. Not all of them.

But anyway it doesn’t work. I got an error

Cannot find module '~/dist/src/index.js'

I don’t know where and why it is looking for this file. I didn’t set up in any of my configuration.
It seems Netlify Dev is looking for it.

If I run yarn dev I have no errors. Everything run smoothly, but ntl dev with command equal to yarn dev do not work.

Is there something I have to do in order to make my framework work inside Netlify Dev?
I cannot find anything on how to develop a framework in order to make it work. From the documentation it seems you can just give the targetPort of the dev server.

It would be also nice to log exactly what my framework is logging.

Something maybe worth mentioning is that my framework launch nuxt as dev server.

import * as cp from 'child_process';

cp.spawn(`npx`, ['nuxt']);

The problem was a dependency module-alias.

I removed it from the package.json and not it works.