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

SWC unable to find node_modules path when using openapi-codegen tool #50547

Closed
1 task done
owonwo opened this issue May 30, 2023 · 4 comments
Closed
1 task done

SWC unable to find node_modules path when using openapi-codegen tool #50547

owonwo opened this issue May 30, 2023 · 4 comments
Assignees
Labels
bug Issue was opened via the bug report template. locked SWC Related to minification/transpilation in Next.js.

Comments

@owonwo
Copy link

owonwo commented May 30, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.14.0
      npm: 9.1.2
      Yarn: 1.22.17
      pnpm: N/A
    Relevant packages:
      next: 13.4.5-canary.2
      eslint-config-next: 13.3.1
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.5

Which area(s) of Next.js are affected? (leave empty if unsure)

SWC transpilation

Link to the code that reproduces this issue or a replay of the bug

https://github.com/owonwo/-openapi-swc-bug-example

To Reproduce

Remove the experimental property and value from the .swcrc and then run npm run generate:api. It should work as expected.

It doesn't work with the @swc/plugin-styled-components plug present

Describe the Bug

image

Expected Behavior

image

It should generate a couple files in the <rootDir>/core/api folder

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@owonwo owonwo added the bug Issue was opened via the bug report template. label May 30, 2023
@github-actions github-actions bot added the SWC Related to minification/transpilation in Next.js. label May 30, 2023
@kdy1 kdy1 self-assigned this Oct 29, 2023
@kdy1
Copy link
Member

kdy1 commented Oct 30, 2023

.swcrc should have no effect

@kdy1
Copy link
Member

kdy1 commented Oct 30, 2023

It works.
https://github.com/kdy1/next-50547

You have to install @swc/plugin-styled-components

@kdy1 kdy1 closed this as completed Oct 30, 2023
@owonwo
Copy link
Author

owonwo commented Oct 30, 2023

Thanks @kdy1

Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked SWC Related to minification/transpilation in Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants