-
Package version6.3.1 Describe the bugThe errorWhen making a build with EnvironmentI have made everything on Windows 10 (With powershell), with Node v20.11.1, and Package.json{
"name": "back",
"version": "0.0.0",
"private": true,
"type": "module",
"license": "UNLICENSED",
"scripts": {
"start": "node bin/server.js",
"build": "node ace build",
"dev": "node ace serve --watch",
"test": "node ace test",
"lint": "eslint .",
"format": "prettier --write .",
"typecheck": "tsc --noEmit"
},
"imports": {
"#controllers/*": "./app/controllers/*.js",
"#exceptions/*": "./app/exceptions/*.js",
"#models/*": "./app/models/*.js",
"#mails/*": "./app/mails/*.js",
"#services/*": "./app/services/*.js",
"#listeners/*": "./app/listeners/*.js",
"#events/*": "./app/events/*.js",
"#middleware/*": "./app/middleware/*.js",
"#validators/*": "./app/validators/*.js",
"#providers/*": "./providers/*.js",
"#policies/*": "./app/policies/*.js",
"#abilities/*": "./app/abilities/*.js",
"#database/*": "./database/*.js",
"#start/*": "./start/*.js",
"#tests/*": "./tests/*.js",
"#config/*": "./config/*.js",
"#utils": "./src/utils.js"
},
"devDependencies": {
"@adonisjs/assembler": "^7.1.1",
"@adonisjs/eslint-config": "^1.2.1",
"@adonisjs/prettier-config": "^1.2.1",
"@adonisjs/tsconfig": "^1.2.1",
"@japa/api-client": "^2.0.2",
"@japa/assert": "^2.1.0",
"@japa/plugin-adonisjs": "^3.0.0",
"@japa/runner": "^3.1.1",
"@swc/core": "^1.3.107",
"@types/luxon": "^3.4.2",
"@types/node": "^20.11.10",
"eslint": "^8.56.0",
"pino-pretty": "^10.3.1",
"prettier": "^3.2.4",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@adonisjs/auth": "^9.1.1",
"@adonisjs/core": "^6.2.2",
"@adonisjs/cors": "^2.2.1",
"@adonisjs/lucid": "^20.1.0",
"@vinejs/vine": "^1.7.1",
"luxon": "^3.4.4",
"mysql2": "^3.9.2",
"reflect-metadata": "^0.2.1"
},
"eslintConfig": {
"extends": "@adonisjs/eslint-config/app"
},
"prettier": "@adonisjs/prettier-config"
} .envTZ=UTC
PORT=3333
HOST=localhost
LOG_LEVEL=info
APP_KEY=...
NODE_ENV=development
DB_HOST=...
DB_PORT=...
DB_USER=...
DB_PASSWORD=...
DB_DATABASE=... IdeaI think the problem come from the import env from '#start/env'
import app from '@adonisjs/core/services/app'
import { defineConfig, targets } from '@adonisjs/core/logger'
const loggerConfig = defineConfig({
default: 'app',
/**
* The loggers object can be used to define multiple loggers.
* By default, we configure only one logger (named "app").
*/
loggers: {
app: {
enabled: true,
name: env.get('APP_NAME'),
level: env.get('LOG_LEVEL'),
transport: {
targets: targets()
.pushIf(!app.inProduction, targets.pretty())
.pushIf(app.inProduction, targets.file({ destination: 1 }))
.toArray(),
},
},
},
})
export default loggerConfig
/**
* Inferring types for the list of loggers you have configured
* in your application.
*/
declare module '@adonisjs/core/types' {
export interface LoggersList extends InferLoggers<typeof loggerConfig> {}
} Reproduction repoNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Is your |
Beta Was this translation helpful? Give feedback.
have you tried
pnpm store prune
maybe you just need to clear the cache or if it still doesn't solve the problem try moving thepino-pretty
package fromdevDependencies
todependencies
and rerunpnpm i -P