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]: Assertion failed: (insertion_info.second) == (true) #660

Open
alefduarte opened this issue Jan 8, 2025 · 8 comments
Open

[Bug]: Assertion failed: (insertion_info.second) == (true) #660

alefduarte opened this issue Jan 8, 2025 · 8 comments

Comments

@alefduarte
Copy link

alefduarte commented Jan 8, 2025

Version

System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz
    Memory: 3.91 GB / 31.67 GB
  Browsers:
    Edge: Chromium (127.0.2651.86)
    Internet Explorer: 11.0.19041.4355

Details

I've just installed version 0.3.0 in order to fix #641 but now I'm getting this error.
Image

  Rslib v0.3.0


  #  C:\Program Files\PowerShell\7\pwsh.exe[37040]: void __cdecl node::CleanupQueue::Add(void (__cdecl *)(void *),void *) at c:\ws\src\cleanup_queue-inl.h:32
  #  Assertion failed: (insertion_info.second) == (true)

----- Native stack trace -----

 1: 00007FF74883BA4B node::SetCppgcReference+16011
 2: 00007FF7487A3481 SSL_get_quiet_shutdown+83953
 3: 00007FF74861FAAC uv_cpumask_size+187148
 4: 00007FF7487E394A napi_add_env_cleanup_hook+58
 5: 00007FFD1FA222A6 napi_register_module_v1+16966
 6: 00007FF7487E3563 node_module_register+10227
 7: 00007FF7487DED96 node::Buffer::New+35814
 8: 00007FF7488383B5 node::SetCppgcReference+2037
 9: 00007FF7487DFDB7 node::Buffer::New+39943
10: 00007FF6E930FA64

----- JavaScript stack trace -----

1: node:internal/modules/cjs/loader:1734:18
2: node:internal/modules/cjs/loader:1318:32
3: node:internal/modules/cjs/loader:1128:12
4: traceSync (node:diagnostics_channel:322:14)
5: wrapModuleLoad (node:internal/modules/cjs/loader:219:24)
6: node:internal/modules/cjs/loader:1340:12
7: require (node:internal/modules/helpers:138:16)
8: C:\xxx\node_modules\rsbuild-plugin-dts\node_modules\@rspack\binding\binding.js:64:29
9: node:internal/modules/cjs/loader:1565:14
10: node:internal/modules/cjs/loader:1708:10

I tried it a sandbox and it worked, I thought it had something to do with the node version, I'm using node v22.12.0, I also tried this one in the sandbox and it worked, maybe it's Windows-related.l

Reproduce link

on a sandbox it worked, maybe it's Windows-related

Reproduce Steps

run pnpm build

@fi3ework
Copy link
Member

fi3ework commented Jan 8, 2025

Try delete node_modules, and re-install again, does it help?

@alefduarte
Copy link
Author

I have tried it already, but unfortunately, the error still persists.

@alefduarte
Copy link
Author

I even deleted the pnpm-lock.yaml file and the node_modules folder, then reinstalled everything, but it still didn't work.

@fi3ework
Copy link
Member

fi3ework commented Jan 8, 2025

Could you try out node 20.18.1 to ensure is it related to specific node version?

@alefduarte
Copy link
Author

Using node 20
Image
Using node 23
Image

@fi3ework
Copy link
Member

fi3ework commented Jan 8, 2025

Weird, could you please provide a minimal reproduction so we could do a further debug?

@lxqueen
Copy link

lxqueen commented Jan 12, 2025

I had this issue too in a pnpm monorepo with node-linker=hoisted as part of my npmrc, but removing it fixed the issue for me — maybe rslib is making assumptions about how node_modules is structured that may not always be the case?

@fi3ework
Copy link
Member

@lxqueen I tried to make a minimal monorepo with node-linker=hoisted but failed to reproduce. Could you helping out provide a minimal reproduction?

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

3 participants