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

webpack-cli wants @swc/register but it is deprecated for @swc-node/register #4129

Closed
vergilfromadyen opened this issue Mar 27, 2024 · 2 comments
Labels

Comments

@vergilfromadyen
Copy link

Describe the bug

What is the current behavior?

This block of logic sometimes leads to the following error when @swc-node/register is used:

[webpack-cli] Unable load '/path/to/webpack.config.ts'
[webpack-cli] Unable to use specified module loaders for ".ts".
[webpack-cli] Cannot find module 'ts-node/register' from '/Users/vergil/adyen-main/frontend/apps/dummy'
[webpack-cli] Cannot find module 'sucrase/register/ts' from '/Users/vergil/adyen-main/frontend/apps/dummy'
[webpack-cli] Cannot find module '@babel/register' from '/Users/vergil/adyen-main/frontend/apps/dummy'
[webpack-cli] Cannot find module 'esbuild-register/dist/node' from '/Users/vergil/adyen-main/frontend/apps/dummy'
[webpack-cli] Cannot find module '@swc/register' from '/Users/vergil/adyen-main/frontend/apps/dummy'
[webpack-cli] Please install one of them

The error occurs because the interpret dependency supports @swc/register and not @swc-node/register.

Expected behavior

webpack-cli can use @swc-node/register

Additional context

I understand the issue occurs because of a dependency to the interpret package, but it leads to webpack-cli depending on deprecated packages.

@alexander-akait
Copy link
Member

Please open an issue in interpret, we can't fix it here, sorry, partially closed in favor #3905, because we want to move this functions inside webpack-cli to fix such problems faster

@alexander-akait
Copy link
Member

There is an issue gulpjs/interpret#98

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

No branches or pull requests

2 participants