I’m trying to Dockerize Adonis following the tutorial of Adonis and the base installation :
https://v5-docs.adonisjs.com/cookbooks/dockerizing-adonis
https://docs.adonisjs.com/guides/getting-started/installation
I’m using the basic starter :
npm init adonisjs@latest hello-world -- --db=mysql --kit=api
The dockerfile is the same as the guide, same for the docker compose, i just don’t use postgres or redis
I started a mariadb in my docker to try the app without dockerizing it, it work fine but if i try to start it using docker compose i have the SyntaxError :
file:///home/node/app/ace.js:22
import { register } from 'node:module'
^^^^^^^^
SyntaxError: The requested module 'node:module' does not provide an export named 'register'
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
at async loadESM (node:internal/process/esm_loader:88:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)
Node version : v21.6.1
I have the same error on Ubuntu 22.04 and Windows 10
Am i missing something ?
Nexko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.