Ravi Bhandari
Ravi Bhandari

Reputation: 4696

Reactjs - Uncaught TypeError: $node.attr(...).tooltip is not a function

I am working on SummerNote mention library and getting error -

Uncaught TypeError: $node.attr(...).tooltip is not a function

i am using "react-summernote": "^2.0.0",

react version - "react": "^16.8.6",

bootstrap - "bootstrap": "^4.4.1",

react-bootstrap - "react-bootstrap": "^1.0.1",

is there any help on this?

Upvotes: 2

Views: 3729

Answers (2)

sakthivel maticz
sakthivel maticz

Reputation: 1

It's worked me, try this in your component.

import $ from "jquery"; window.$ = window.jQuery = $;

Add bootstrap cdn ([email protected]) in index.html

<!-- bootstrap cdn -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>

Upvotes: -1

Codebling
Codebling

Reputation: 11397

According to this issue comment, bootstrap needs to be installed to prevent that error. Another comment lower down says that Popper.js needs to be installed, as well.

npm i bootstrap @popperjs/core

I see that you already have bootstrap installed, so just installing @popperjs/core should fix it.

Upvotes: 2

Related Questions