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

3.4.1 error -- TypeError: Cannot read property '$$typeof' of undefined #148

Closed
amitmaor opened this issue Oct 2, 2019 · 4 comments
Closed
Labels

Comments

@amitmaor
Copy link

amitmaor commented Oct 2, 2019

Hi there, I'm getting the following error in my tests in files using enzyme-to-json:

TypeError: Cannot read property '$$typeof' of undefined

      at extractTypeName (node_modules/enzyme-to-json/utils.js:61:24)
      at internalNodeToJson (node_modules/enzyme-to-json/shallow.js:62:38)
      at node_modules/enzyme-to-json/shallow.js:23:12
          at Array.map (<anonymous>)
      at getChildren (node_modules/enzyme-to-json/shallow.js:22:78)
      at internalNodeToJson (node_modules/enzyme-to-json/shallow.js:64:15)
      at node_modules/enzyme-to-json/shallow.js:23:12
          at Array.map (<anonymous>)
      at getChildren (node_modules/enzyme-to-json/shallow.js:22:78)
      at internalNodeToJson (node_modules/enzyme-to-json/shallow.js:64:15)
      at node_modules/enzyme-to-json/shallow.js:23:12
          at Array.map (<anonymous>)
      at getChildren (node_modules/enzyme-to-json/shallow.js:22:78)
      at internalNodeToJson (node_modules/enzyme-to-json/shallow.js:64:15)
      at shallowToJson (node_modules/enzyme-to-json/shallow.js:89:12)
      at Object.<anonymous>.exports.default (node_modules/enzyme-to-json/index.js:10:34)
      at Object.<anonymous> (src/components/MyComponent/index.test.js:21:43)
          at new Promise (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:189:7)

This is only happening on 3.4.1 which npm tells me was released less than an hour ago. If I go back to my previous version (3.3.5) this error goes away.

Just wanted you to be aware! Not currently blocked since 3.3.5 is working fine for me.

@silentroach
Copy link

the same was in #122

@VincentLanglet
Copy link
Collaborator

VincentLanglet commented Oct 3, 2019

This should be introduce by https://github.com/adriantoine/enzyme-to-json/pull/145/files#diff-2b4ca49d4bb0a774c4d4c1672d7aa781

Do you have a way to reproduce the bug ?

@VincentLanglet
Copy link
Collaborator

This should fix the bug
https://github.com/adriantoine/enzyme-to-json/pull/149/files

@VincentLanglet
Copy link
Collaborator

Since there is another problem with the PR (see #150), I made a revert temporary and deploy a new release 3.4.2

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

3 participants