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

Next 13.4.3 onwards issue with swcPlugins #62

Closed
TimFL opened this issue May 31, 2023 · 8 comments
Closed

Next 13.4.3 onwards issue with swcPlugins #62

TimFL opened this issue May 31, 2023 · 8 comments

Comments

@TimFL
Copy link

TimFL commented May 31, 2023

Hello,

as of Next 13.4.3 I'm having issues with this plugin being used in my project. I troubleshooted on a blank Next project and my current work project, with both projects having the same dependency setup.

The second I add this to my next.config:
experimental: { swcPlugins: [ [ "@lingui/swc-plugin", {} ] ] }
My project dies with the following error messages from that issue: vercel/next.js#36078 (comment)

Could this, be in any way, related to the swc Plugin? I've trialed another swc plugin and it didn't cause the issue.

Running the 4.0.0 Plugin due to the swc core issue.

@thekip
Copy link
Collaborator

thekip commented May 31, 2023

According to Compatibility for next 13.4.3 you should use 4.0.1 version of plugin which is having known issue right now

@thekip
Copy link
Collaborator

thekip commented Jun 1, 2023

Well, while i've found how to make plugin work with next@13.4.3, it still doesn't work with 13.4.4 and up. It seems nextjs broke something in plugins support. I will create a separate issue on theirs repo.

@thekip
Copy link
Collaborator

thekip commented Jun 1, 2023

Tracking PR fixing thie issue: vercel/next.js#50651

@lucasterra
Copy link

Tested with next@13.4.5-canary.7 and @lingui/swc-plugin@v4.0.2 and it works for me.

@TimFL TimFL closed this as completed Jun 9, 2023
@where-are-the-turtles
Copy link

hey @thekip! It doesn't seem to work with 4.2.1: https://github.com/where-are-the-turtles/js-lingui/tree/main/examples/nextjs-swc.

@thekip
Copy link
Collaborator

thekip commented Jun 14, 2023

@where-are-the-turtles it's not enought information from your comment, what and how exactly not working.

@where-are-the-turtles
Copy link

@where-are-the-turtles it's not enought information from your comment, what and how exactly not working.

there are a bunch of errors from the loader:

./node_modules/@lingui/loader/dist/index.cjs!./src/locales/pt.po
Invalid dependencies have been reported by plugins or loaders for this module. All reported dependencies need to be absolute paths.
Invalid dependencies may lead to broken watching and caching.
As best effort we try to convert all invalid values to absolute paths and converting globs into context dependencies, but this is deprecated behavior.
Loaders: Pass absolute paths to this.addDependency (existing files), this.addMissingDependency (not existing files), and this.addContextDependency (directories).
Plugins: Pass absolute paths to fileDependencies (existing files), missingDependencies (not existing files), and contextDependencies (directories).
Globs: They are not supported. Pass absolute path to the directory as context dependencies.
The following invalid values have been reported:
 * "src/locales/en.po"

@thekip
Copy link
Collaborator

thekip commented Jun 19, 2023

it's just a warning. Just ignore it for now, it's not related to SWC plugin and already a known issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants