Question: I have installed via npm jquery and jstree.

In my file I have imports for both:

```
import $ from 'jquery';
import jstree from 'jstree';

```

While $ is found the reference to $.jstree is not. ¿Any clues?

Answer: 
Being a react project I had to include in my index.html the scripts manually and then, inside the module, reference $ as: 

```
var $ = window.$;

```
I also encountered this problem when I was doing a project with Vue.js. The following command will useful for you:

* Code for import libs

```
    import $ from 'jquery'
    import 'jstree'
    // !!!Default jstree css file remove if you do not need it!!!
    import 'jstree/dist/themes/default/style.min.css'

```

* Code for initial your tree (example)

```
    $(function () {
                $('#container').jstree({
                    'core': {
                      data: [
                        {
                          "text": "Same but with checkboxes",
                          "children": [
                            {
                              "text": "initially selected",
                              "selected": true
                            },
                            {
                              "text": "custom icon",
                              "icon": "fa fa-warning icon-state-danger"
                            },
                            {
                              "text": "initially open",
                              "icon": "fa fa-folder icon-state-default",
                              "opened": true,
                              "children": [
                                {
                                  "text": "Another node"
                                }
                              ]
                            },
                            {
                              "text": "custom icon",
                              "icon": "fa fa-warning icon-state-warning"
                            },
                            {
                              "text": "disabled node",
                              "icon": "fa fa-check icon-state-success",
                              "disabled": true
                            }
                          ]
                        },
                        {
                          "text": "Same but with checkboxes",
                          "opened": true,
                          "children": [
                            {
                              "text": "initially selected",
                              "selected": true
                            },
                            {
                              "text": "custom icon",
                              "icon": "fa fa-warning icon-state-danger"
                            },
                            {
                              "text": "initially open",
                              "icon": "fa fa-folder icon-state-default",
                              "opened": true,
                              "children": [
                                {
                                  "text": "Another node"
                                }
                              ]
                            },
                            {
                              "text": "custom icon",
                              "icon": "fa fa-warning icon-state-warning"
                            },
                            {
                              "text": "disabled node",
                              "icon": "fa fa-check icon-state-success",
                              "disabled": true
                            }
                          ]
                        },
                        {
                          "text": "And wholerow selection"
                        }
                      ]
                    }
                });
            });

```

Related Useful Pages:

* <https://github.com/vakata/jstree/issues/1675>
* <https://dev.to/ayekpleclemence/how-to-add-jquery-to-vue-4n4>