[Bug]: Open API to TSP failing "openapi3-to-tsp@*' is not in this registry."
Describe the bug
Cant seem to find any other similar issues and I'm rather new to npm
Trying to convert an OpenAPI spec to Typespec with the following commands
npm install @typespec/openapi npx openapi3-to-tsp compile --output-dir "./tsp-output" "./swagger.yml"
Generates the following output
npm error code E404 npm error 404 Not Found - GET https://registry.npmjs.org/openapi3-to-tsp - Not found npm error 404 npm error 404 'openapi3-to-tsp@*' is not in this registry. npm error 404 npm error 404 Note that you can also install from a npm error 404 tarball, folder, http url, or git url.
Reproduction
npm install @typespec/openapi npx openapi3-to-tsp compile --output-dir "./tsp-output" "./swagger.yml"
Checklist
- [X] Follow our Code of Conduct
- [X] Check that there isn't already an issue that request the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- [X] The provided reproduction is a minimal reproducible example of the bug.
@Palving
Thanks for opening an issue. The CLI is part of the @typespec/openapi3 package and is named tsp-openapi3.
https://typespec.io/docs/next/emitters/openapi3/cli
There is a @typespec/openapi package but that's not the same.
If you're running this outside of an npm project, you'll likely want to globally install the package first:
npm install -g @typespec/openapi3
Then you should be able to run tsp-openapi3 from anywhere.
Worked! Thank you :)