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

[Bug]: error when trying to run #70

Open
Dianoga opened this issue Aug 30, 2023 · 2 comments
Open

[Bug]: error when trying to run #70

Dianoga opened this issue Aug 30, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@Dianoga
Copy link

Dianoga commented Aug 30, 2023

Package name

payload-openapi

What happened?

When I try to run this I get the following error. I did a quick look at the source and tried setting the tsconfig baseUrl but that didn't fix it.

Any pointers?

❯ npx create-payload-api-docs -c src/config.ts                                                                                                                                 [13:45:25]
thread '<unnamed>' panicked at 'base_dir(`./`) must be absolute. Please ensure that `jsc.baseUrl` is specified correctly. This cannot be deduced by SWC itself because SWC is a transpiler and it does not try to resolve project details. In other works, SWC does not know which directory should be used as a base directory. It can be deduced if `.swcrc` is used, but if not, there are many candidates. e.g. the directory containing `package.json`, or the current working directory. Because of that, the caller (typically the developer of the JavaScript package) should specify it. If you see this error, please report an issue to the package author.', /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/swc_ecma_transforms_module-0.175.3/src/path.rs:104:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to handle: base_dir(`./`) must be absolute. Please ensure that `jsc.baseUrl` is specified correctly. This cannot be deduced by SWC itself because SWC is a transpiler and it does not try to resolve project details. In other works, SWC does not know which directory should be used as a base directory. It can be deduced if `.swcrc` is used, but if not, there are many candidates. e.g. the directory containing `package.json`, or the current working directory. Because of that, the caller (typically the developer of the JavaScript package) should specify it. If you see this error, please report an issue to the package author.

What did you expect

No response

Setps to reproduce

This was a pretty barebones setup. I installed create-payload-api-docs as a dev dependency and tried to run it as described.

Tool version

1.4.0

Payload version

1.14.0

Node version

18.17.1

@Dianoga Dianoga added the bug Something isn't working label Aug 30, 2023
@teunmooij
Copy link
Owner

Thanks for reporting this issue. Looks like some internal change in payload. I'll look into it

@nathanclevenger
Copy link

I'm getting this same issue as well - unable to run payload-openapi at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants