You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Generate a client using the typescript-axios generator.
Note that the .gitignore file generated includes the dist folder.
Run npm publish. You can see in the output that the tarball does not include dist folder.
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.
The text was updated successfully, but these errors were encountered:
I'm sure there's a bit of overlap here, but I am also noticing that both my files and publishConfig sections are missing when the new package.json. I'm sure this is related to your problem?
I was really confused there until I found this issue, I thought I was doing something wrong but I followed the instructions (of which there aren't a lot) to the letter. This does not sound hard to fix?
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
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.The text was updated successfully, but these errors were encountered: