OpenAPITools / OpenAPITools/openapi-generator

[BUG][Typescript] Could not resolve dependency Node 16.x

Open
#12,483 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

When trying to install dependencies for the generated code npm throws an error "Could not resolve dependency for tsickle".
It could not install dependencies either locally not in the pipeline.
image

openapi-generator version
"version": "6.0.0-beta",
OpenAPI declaration file content or url
Generation Details

Pipeline node version: 16.14.2

Local machine node version: 16.15.0
Local machine npm version: 8.5.5

{
  "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "6.0.0-beta",
    "generators": {
      "DEService": {
        "generatorName": "typescript-angular",
        "glob": "../economics/swagger.json",
        "output": "./",
      }
    }
  }
}
Steps to reproduce
  1. Use npm 8.x or node 16.x
  2. Generate Angular lib code
  3. Try npm install
  4. Note the error
Related issues/PRs
Suggest a fix

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue from the generated typescript-angular library using Node 16.x and npm 8.x, as described in the steps. Inspect the generated dependency configuration for tsickle and verify that npm install completes successfully; done means the generated library installs locally and in the pipeline without the dependency-resolution error.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, node.js, typescript
Domain
build-system, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.