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.

TypeError when using html template element

See original GitHub issue

Hello,

I use Webpack 2 to import Tippy, just with an alias:

resolve: {
    alias: {
      'tippy$': 'tippy.js/dist/tippy.js',
    }
}

Then when creating a new Tippy instance:

import Tippy from 'tippy.js'
//...
new Tippy('.test', {
    html : document.querySelector('#test')  //It works fine with just the selector '#test'
})

I got the following error:

TypeError: Converting circular structure to JSON
    at Object.stringify (<anonymous>)
    at Tippy._applyIndividualSettings (webpack:///./~/tippy.js/dist/tippy.js?:2653:47)

It seems the HTMLElement is passed through the JSON.stringify method.

I have doubts on my way to import Tippy with webpack, but I’m running out of things to try…

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mathieucivelcommented, Apr 25, 2017

Well it works for me now 😃 Thank you.

0reactions
atomikscommented, Apr 24, 2017

Any luck?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Application from html-template getting TypeError ...
It must be that your code in main.js is getting executed before the .mobile-nav-toggle is ready. At that point the element is not...
Read more >
The parser breaks when using html template tag #4800
The parser breaks when using html template tag: > stylelint "client/src/pages/**/*.ts" TypeError: result.apply is not a function at ...
Read more >
The Content Template element - HTML - MDN Web Docs
The <template> HTML element is a mechanism for holding HTML that is not to be rendered immediately when a page is loaded but...
Read more >
Templating in HTML
The entire process of cloning a template and updating it with data is ... The organization of the lit-html and lit-element packages didn't ......
Read more >
5. Working with the Shadow DOM - Modern JavaScript [Book]
The first step is to create a template node. This example leverages the template from the previous chapter, with the addition of an...
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