Ticket T598839
Visible to All Users

The Cannot find name 'JQueryAjaxSettings'. error occurs on an attempt to install dx.aspnet.data in Angular CLI

created 7 years ago

[DevExpress Support Team: CLONED FROM T598615: DataGrid - Server-side pagination in Angular]
Hi Artem,

I have tried to install the “devextreme-aspnet-data
withnpm installdevextreme-aspnet-data into my angular-cli project
I’m using angular 5.2 with latest angular-cli 1.6.5 and jquery installed

When I try to ng serve my application with nodeJs the following error appeared

ERROR in node_modules/devextreme-aspnet-data/js/dx.aspnet.data.d.ts(18,54): error TS2304: Cannot find name 'JQueryAjaxSettings'.

https://github.com/DevExpress/DevExtreme.AspNet.Data/issues/168
I found this article about the error from AntonSermyazhko ( https://github.com/AntonSermyazhko )

and I have followed his instructions to add include section with "node_modules/@types/jquery” in tsconfig.json but with no success.
"include": [``````"node_modules/@types/jquery"``````]

Could you please provide me more details how I can fix this?
Thanks.

Answers approved by DevExpress Support

created 7 years ago (modified 7 years ago)

Hi,

I believe the issue occurs if the types option is defined in the tsconfig.app.json file. If so, you need to modify it as follows:

XML
"types": ["jquery", .... your other types here]

In addition, you need to manually install jQuery and jQuery typing in your application.

XML
npm install --save jquery @types/jquery

I've also attached an example illustrating these ideas.

Let us know if this information helps.

    Comments (1)

      Thanks for the help! This helped finding a solution!

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.