Use handsontable with sage

Hi, i installed sage in my wordpress website and created a single page.
Next i tried to install handsontable (https://handsontable.com/) using the following command:
bower install handsontable --save
Then run gulp, to compile. All the necesary files seems to be present but i can’t manage to have handsontable render the basic example. And instead i get this javascript error:
ReferenceError: Handsontable is not defined
I checked the bower.json file and tried to add an overwrite like this:
"ng-table": { "main": [ "./dist/ng-table.min.js", "./dist/ng-table.min.css" ] }

And seems to not work, apparently this library has a dependency for angular which im not sure how to fix. Any help its appreciated many thanks in advance!

Checking out handsontable’s Github page, there’s a reference to these files:

dist/handsontable.full.js
dist/handsontable.full.css

Have you tried including those files instead?

"handsontable": {
  "main": [
    "./dist/handsontable.full.js",
    "./dist/handsontable.full.css"
  ]
}

I ran into this issue while trying to add Packery, and found I had to include the “full” version which had all deps in the script.

Also you shouldn’t reference minified versions of files, since Gulp will minify them for you, so just reference the uncompressed files.

1 Like

Hi @drawcardau Thanks for your reply it worked!!
I think i missed the obvious solution, to check the git. Thanks again

1 Like