Open DanielStoehr opened 1 week ago
Hi,
Can you show your project.json
please?
If you are using inferred targets with Nest, at the moment we do not have support for it.
Here is my current project json:
{
"name": "api",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/api/src",
"projectType": "application",
"tags": [],
"targets": {
"serve": {
"executor": "@nx/js:node",
"defaultConfiguration": "development",
"options": {
"buildTarget": "api:build"
},
"configurations": {
"development": {
"buildTarget": "api:build:development"
},
"production": {
"buildTarget": "api:build:production"
}
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/api/jest.config.ts"
}
},
"build-migration-config": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist-mig",
"main": "apps/api/src/typeorm.config.ts",
"tsConfig": "apps/api/tsconfig.app.json",
"rootDir": "."
}
},
"makemigrations": {
"executor": "nx:run-commands",
"outputs": ["{options.outputPath}"],
"options": {
"cwd": "apps/api/src/migrations",
"commands": ["sh ./makemigrations.sh"],
"parallel": false
},
"dependsOn": ["build-migration-config"]
},
"migrate": {
"executor": "nx:run-commands",
"outputs": ["{options.outputPath}"],
"options": {
"cwd": "apps/api/src/migrations",
"commands": [
"npx typeorm -d /app/dist-mig/apps/api/src/app/typeorm.config.js migration:run"
]
},
"dependsOn": ["build-migration-config"]
}
}
}
I am facing the same problem. We use https://github.com/simov/slugify in our project and all worked fine until the latest update. Is there any way to manually add packages to generated package.json ?
@DanielStoehr I found a workaround in another issues comment, maybe this can help you as much as it did help me:
Just add a package.json in your Nest.js apps root which only contains the missing packages as dependencies. Worked for me
ok, i will try that. But anyway in the ealier version it worked without this workaround.
Current Behavior
Hello, I´m using NX with NestJs and Angular. Now My NestJS App using typeorm with mssql. I want to create the packge json over my webpack config:
here is my current package.json of my project:
after build my app the generated package.json is following:
now can can not startup the app because the "mssql" package is missing
Expected Behavior
the mssql package should be included in the generated package json
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response