Skip to content

Register Route macro from a provider from a package. #4764

Answered by Julien-R44
ntatoud asked this question in Help
Discussion options

You must be logged in to vote

Yes, definitely an issue with pnpm link. You end up with two versions of @adonisjs/core in your project, and you’re adding the macro to the wrong instance.

What I recommend is using the file protocol to test your package locally.
In the package.json of your test app, add something like :

{
  "@ntatoud/openapi": "file:../path/to/your/package"
}

Then run pnpm install and it should work.
A small drawback of this method is that you’ll need to run pnpm install in your test app each time you rebuild your package

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ntatoud
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants