Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #3224
Closed
Open
Issue created Jun 26, 2019 by Administrator@rootContributor

[BUG][JAVASCRIPT] dist folder is not published when publishing typescript-axios generated client with npm publish

Created by: davidscoff

Description

When publishing a generated typescript-axios client the dist folder is not published as it is included in the .gitignore file in the project. This means that when you try to include the generated client as a dependency in another project npm will be unable to resolve the module.

openapi-generator version

4.0.2

OpenAPI declaration file content or url

Any project generated using the typescript-axios generator will suffer from this issue.

Command line used for generation

I'm using the openapi-generator cli installed through homebrew.

Steps to reproduce
  1. Generate a client using the typescript-axios generator.
  2. Note that the .gitignore file generated includes the dist folder.
  3. Run npm publish. You can see in the output that the tarball does not include dist folder.
  4. npm install the published tarball in another project. You will see an error complaining that the module can't be found.
Suggest a fix

An .npmignore file can be included in the generated project by default which will override the .gitignore file. Or alternatively the files property can be populated in package.json to ensure the dist directory is published. See more here.

Assignee
Assign to
Time tracking