jquery-bracket icon indicating copy to clipboard operation
jquery-bracket copied to clipboard

Property 'bracket' does not exist on type 'JQuery'

Open tssajay opened this issue 8 years ago • 6 comments

Installed npm jquery, npm jquery-bracket
but it is showing the following error: Property 'bracket' does not exist on type 'JQuery'.

tssajay avatar Dec 20 '17 07:12 tssajay

Same here. Want to use it in Angular4/5, but can't get it working. Get a lot of error and jquery-bracket can't be imported as library.

ElHupeke avatar Dec 20 '17 19:12 ElHupeke

The library tries to get jQuery from global scope. It's not compiled as an importable module. If you're using e.g. webpack to compile your project, you need to indicate this.

https://github.com/teijo/jquery-bracket/blob/1be237773147308691e6cc6f810baca9232e07df/src/jquery.bracket.ts#L1549

teijo avatar Jan 01 '18 23:01 teijo

Thank you Teijo, got it working :-)

ElHupeke avatar Jan 07 '18 19:01 ElHupeke

Hey im having the same issue here, i cant import the package, im using webpack too, and i added jquery. Im lost in the link that you shared. could you elaborate a little ? Thanks

ricardoglez avatar Apr 12 '18 22:04 ricardoglez

@ricardoglez ah, hadn't used permalink so the file had changed since the comment. Updated the link now.

Basically the file expects to find jQuery object, which you can probably configure for Webpack with this https://github.com/webpack/docs/wiki/shimming-modules#plugin-provideplugin

teijo avatar Apr 13 '18 19:04 teijo

thanks @teijo, i ve configured webpack with the import-loader plugin and it works just fine, thanks for the quick answer ! :+1:

ricardoglez avatar Apr 16 '18 21:04 ricardoglez