Giter VIP home page Giter VIP logo

Comments (7)

DanielStoehr avatar DanielStoehr commented on August 16, 2024 1

ok, i will try that.
But anyway in the ealier version it worked without this workaround.

from nx.

joe-passenger avatar joe-passenger commented on August 16, 2024 1

@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.

ndcunningham avatar ndcunningham commented on August 16, 2024

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.

DanielStoehr avatar DanielStoehr commented on August 16, 2024

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.

phihochzwei avatar phihochzwei commented on August 16, 2024

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.

phihochzwei avatar phihochzwei commented on August 16, 2024

@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.

charsleysa avatar charsleysa commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.