valor-software/ng2-handsontable

Cannot find name 'Handsontable'

Closed this issue · 2 comments

My Project is manage by Angular CLI
I've installed ng2-handsontable and handsontable with the following commands :

npm install handsontable --save
npm install ng2-handsontable --save

But when serving files on my local machine with yarn : i have the error Cannot find name 'Handsontable'

I manage to solve this issue by editing the handsontable.component.d.ts in node_modules/ng2-handsontable

replacing the following import :
import * as Handsontable from 'handsontable';
with
import Handsontable from 'handsontable';
but its kind of a dirty solution to me. Is it a bug or i did something wrong?

ng2-handsontable already installs handsontable as a dependency. The version in the package.json is "handsontable": "^0.31.0". You have probably installed the latest version, 0.32, which could be the issue. Try it again without your own version of handsontable. (I'll make sure we upgrade to 0.32 soon.)

import Handsontable from 'handsontable'; is not a valid syntax. Maybe that's why you don't get the error anymore?

Thats the solution, thank you!