weixin_39731682
weixin_39731682
2020-12-02 07:40

Enzyme Internal Error: unknown node with tag 14

Getting Enzyme Internal Error: unknown node with tag 14 where mount is used on cloned element node. For instance:

jsx
...
 mount(React.cloneElement(node))
...

Works fine on version 4.

该提问来源于开源项目:rebassjs/grid

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

10条回答

  • weixin_39731682 weixin_39731682 5月前

    thanks, waiting forward for the release to be happened.

    点赞 评论 复制链接分享
  • weixin_39731682 weixin_39731682 5月前

    enzyme-adapter-react-16 v1.3.0 has fixed an error. Closing the issue.

    点赞 评论 复制链接分享
  • weixin_39938312 weixin_39938312 5月前

    I'm facing the same issue. Did you find out a solution? Or simply downgraded to version 4?

    点赞 评论 复制链接分享
  • weixin_39731682 weixin_39731682 5月前

    I personally downgraded to 4 while this is being fixed.

    点赞 评论 复制链接分享
  • weixin_39938312 weixin_39938312 5月前

    I did the same, thank you!

    点赞 评论 复制链接分享
  • weixin_39964391 weixin_39964391 5月前

    got the same issue today. shallow is fine

    js
    import {mount} from 'enzyme';
    import {Box } from 'grid-styled';
    mount(<box></box>) ;// unknown node with tag 14
    
    点赞 评论 复制链接分享
  • weixin_39731682 weixin_39731682 5月前

    Is there any progress on this?

    点赞 评论 复制链接分享
  • weixin_39575737 weixin_39575737 5月前

    Solved by: https://github.com/airbnb/enzyme/pull/1592

    点赞 评论 复制链接分享
  • weixin_39731682 weixin_39731682 5月前

    Still getting the same issue Enzyme Internal Error: unknown node with tag 14 with the following dependencies:

    
    ├─ enzyme.4.4
    ├─ grid-styled.0.2
    ├─ styled-components.3.3
    └─ styled-system.0.2
    
    点赞 评论 复制链接分享
  • weixin_39575737 weixin_39575737 5月前

    New versions of

    
    enzyme-adapter-react-16
    enzyme-adapter-react-16.3
    enzyme-adapter-react-16.2
    enzyme-adapter-react-16.1
    

    need to be released to npm before this will work again.

    点赞 评论 复制链接分享

相关推荐