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]: cannot access a scoped thread local variable without calling set first for 1.2.2 #9109

Open
RainedX opened this issue Jan 24, 2025 · 3 comments
Assignees
Labels
bug Something isn't working need reproduction

Comments

@RainedX
Copy link

RainedX commented Jan 24, 2025

System Info

System: Mac
Browser: Chrome lastest

Details

when i use rspack version is 1.2.2. something error like this:
cannot access a scoped thread local variable without calling set first

  1. When I remove HtmlRspackPlugin, it can build success!
  2. I use rspack version 1.1.16 and still use HtmlRspackPlugin, it also can build success.

Reproduce link

refer: #7725

Reproduce Steps

npm run build

@RainedX RainedX added bug Something isn't working pending triage The issue/PR is currently untouched. labels Jan 24, 2025
@Taylor-Wu-96
Copy link

I also meet the same situation after rspack 1.2.0
it can still use in 1.2.0-beta-0

I use multiple rspack.HtmlRspackPlugin in my rspack.prod.config.js
but onyl one of the following setting will crash

    new rspack.HtmlRspackPlugin({
      inject: true,
      chunks: ['main'],
      template: paths.appHtml,
      filename: 'index.html',
      publicPath: '/',
      templateParameters: {
        PUBLIC_URL: env.raw.PUBLIC_URL || '',
        ...env.raw,
      },
      minify: true,
    }),

@RainedX
Copy link
Author

RainedX commented Jan 25, 2025

@Taylor-Wu-96 Exactly the same, only one of the multiple HtmlRspackPlugins has a problem

@irwinarruda
Copy link

Same issue here. I did not run into this problem in a Windows or MacOS environment. For me, it only happened on Linux. I'm using "@rspack/core": "^1.2.2".

@chenjiahan chenjiahan added need reproduction and removed pending triage The issue/PR is currently untouched. labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need reproduction
Projects
None yet
Development

No branches or pull requests

5 participants