question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate atom key warning when used from multiple bundles

See original GitHub issue

For 0.0.8, I am getting the following blocking error (was working fine with 0.07):

recoil.development.js:117 Uncaught TypeError: Cannot destructure property 'error' of 'undefined' as it is undefined.

Two issues afaics:

  1. It displays the wrong error, since there isnt a third parameter in the call from registerNode: https://github.com/facebookexperimental/Recoil/blob/22b42bbc0366bf748b4265735eb4b6c90c90ff1f/src/core/Recoil_Node.js#L84
  2. The actual error (Duplicate atom key …) it wants to display is not correct, since I have only one of this key registered (it is not duplicated), however the package is called from two bundles.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

52reactions
hmtri1011commented, Jul 16, 2020

image Hi all, I got this warning when trying Recoil with NextJS. This happens every time I try refresh with new page.

I think it might be HMR problem because it happened on development only, but I want to know how I do a singleton pattern for atom to prevent this warning on development.

Thanks!

1reaction
atanasstercommented, Jun 1, 2020

I am using hmr however the error shows without hmr being invoked (no files are changed, just loading the app generates the error)

Read more comments on GitHub >

github_iconTop Results From Across the Web

reactjs - recoil: Duplicate atom key - in nextjs - Stack Overflow
Duplicate atom key "companyData". This is a FATAL ERROR in production. But it is safe to ignore this warning if it occurred because...
Read more >
NetSuite Applications Suite - Duplicate Number Warnings
Duplicate Detection Preferences · Duplicate Record Notification · NetSuite Account Information · Antivirus Scanning on File Cabinet Files · Using System ...
Read more >
PyMOL Command Reference
This is the list of all PyMOL commands which can be used in the PyMOL command ... This operation typically takes several seconds...
Read more >
apt-key deprecation warning when updating system
W: https://packages.microsoft.com/repos/edge/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the ...
Read more >
Going 3D: The PDB module - Biopython - Read the Docs
Note however that many PDB files contain headers with incomplete or ... as a key (e.g. you can extract an Atom object from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found