Comments (7)
ok, i will try that.
But anyway in the ealier version it worked without this workaround.
from nx.
@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
I've been doing the same thing, but in the new package.json file, you can just specify the version as "*"
so that the version will still be controlled by the main package.json file.
{
"name": "my-app-name",
"dependencies": {
"mssql": "*"
}
}
from nx.
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.
from nx.
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"]
}
}
}
from nx.
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 ?
from nx.
@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
from nx.
I'm having the same issue with the following dependency:
"postgres": "charsleysa/postgres#fix-errors-compiled",
I can work around it by adding the following to the package.json in the app root:
"dependencies": {
"postgres": "git+ssh://[email protected]/charsleysa/postgres.git#335137370d4068041a09e25f4ca8d1a9d704a235"
}
from nx.
Related Issues (20)
- `nx migrate latest` fails on an Angular workspace: `Unable to fetch migrations for @ngrx/[email protected]`
- nx rollup build fails in CI without any useful error message
- npm install is flaky related to "nx" "post-install" native-bindings [includes full repo] HOT 3
- NX doesnt install on my Macbook
- `nx report` yield "Cannot convert undefined or null to object" error after upgrading from 14.8.6 to 15.0.0
- Module Federation SSR error: "Shared module is not available for eager consumption"
- Nx updates my Next version after creating a new application HOT 1
- nx reset --only-workspace-data (nx 9.2.x - 9.5.1) => Failed to reset the Nx workspace HOT 14
- `nx release plan` with a project containing a scoped npm package, and no project name creates a malformed plan
- "Cannot find module '@angular/build/package.json'" in a new monorepo workspace in generated angular app HOT 1
- Linting problem after migrating to 19.5.1 HOT 2
- Way to disable `packageManager` being added to the generated package.json
- Tailwind does not work in new workspace with React, No React Framework, Rspack, Tailwind setup
- Cannot find module '@nx/nx-darwin-arm64' HOT 7
- Unexpected token error when run nx with pnpm
- Vitest: cache.dir still present in generated config
- Intermittent Postinstall error for node 18.20.3 HOT 7
- Incorrect exit code when karma tests fail in CI HOT 1
- Unexpected token when running `nx run [project-name]:nx-release-publish
- Hangs when pnpm install at postinstall HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx.