Why am I getting a "Cycle detected" error?
See original GitHub issueHey, I am new to signals. This looks like an amazing tool I am planning to use in my future developments. I just try @preat/signals using preact.js but have the following error every time I try to update the value of the signal I have created.
Uncaught Error: Cycle detected
at index.ts:168:17
at Set.forEach (<anonymous>)
at h2 (index.ts:160:7)
at index.ts:175:5
at Set.forEach (<anonymous>)
at h2 (index.ts:160:7)
at e3.set (index.ts:84:5)
at Object.onChange [as changefalse] (Test.jsx:19:29)
at HTMLInputElement.I (props.js:153:20)
(anonymous) @ index.ts:168
h2 @ index.ts:160
(anonymous) @ index.ts:175
h2 @ index.ts:160
set @ index.ts:84
onChange @ Test.jsx:19
I @ props.js:153
Any idea?
Thanks a lot.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
c# - Cycles detected - Stack Overflow
NU1108 Cycle detected error was reported in error log for several projects. Solution: Examine all projects in the solution, check the solution ...
Read more >Cycle detected for a common library - Microsoft Q&A
Here I get Cycle detected error,. There is one really irritating error that I also encountered earlier, which may seems famous for some....
Read more >NuGet - error NU1108: cycle detected | .NET Land
After that, I noticed that the problem is with the project name. Its name was the same as the referenced NuGet package.
Read more >error NU1108: Cycle detected - when building project created ...
Code can't be reference in a folder called My.Special.Code.ForServices otherwise it will get the same error: Cycle detected. My.Special.
Read more >"Manager Cycle Detected" Error in Add New Employee Wizard
When we hire an employee using "Add New Employee" wizard, a "Manager cycle detected" erro appears as we click the "Save" button.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should recreate the problem https://codepen.io/kaheglar/pen/yLjVMNa
(Error thrown once. You’ll need to refresh to see again)
Just published a new version of the signals package which addresses this issue. Like @developit said, it was caused by our tooling not publishing a new version of
@preact/signals
although it should’ve done that. Apologies for the inconvenience!Updating to the latest version fixes the “Cycle detected” error.