Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: deploy.ts doesn't compile with tsconfig.json #472

Closed
crispheaney opened this issue Jul 4, 2021 · 6 comments
Closed

cli: deploy.ts doesn't compile with tsconfig.json #472

crispheaney opened this issue Jul 4, 2021 · 6 comments
Labels
cli help wanted Extra attention is needed

Comments

@crispheaney
Copy link
Contributor

crispheaney commented Jul 4, 2021

During anchor migrate, when the deploy.ts is compiled, it doesn't use the tsconfig.json. If you pass a specific file to tsc, it doesn't use the project tsconfig.json. See here.

Two solutions come to mind:

  1. Run tsc without specifying deploy.ts and compile all the ts files in project
  2. Add a tsconfig.json to the migrations directory and run tsc without specifying deploy.ts
@armaniferrante armaniferrante added cli help wanted Extra attention is needed labels Jul 4, 2021
@crispheaney
Copy link
Contributor Author

@Standaa would be interested to hear your thoughts on this since you added the ts support for migrations. Also @NorbertBodziony since you added ts support for tests.

@crispheaney
Copy link
Contributor Author

Another option:

  • Add ts-node as a dependency
  • Run ts-node migrations/deploy.ts

@armaniferrante
Copy link
Member

Another option:

  • Add ts-node as a dependency
  • Run ts-node migrations/deploy.ts

I'm not very familliar with ts-node but this feels like the smoothest option.

@NorbertBodziony
Copy link
Contributor

Personally, i have been using ts-node migrations/deploy.ts

@crispheaney
Copy link
Contributor Author

That's how I got it to work on my project as well 😅 I will make a PR to update anchor migrate to use ts-node migrations/deploy.ts

@armaniferrante
Copy link
Member

Done by #477.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants