Search results
Suggest a FeaturePDF

How to resolve jQuery is not defined issue in latest angular builder(application, browser-esbuild)

The issue will occur only when we use the latest angular builder(application, browser-esbuild).The issue can be resolved by following the below steps.

  1. Refer the jQuery script file (jquery.js) as given in the angular.json file within the projectname > scripts section (For example, reportviewerapp > scripts).

    {
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "project": {
        "name": "reportviewerapp"
    },
    "reportviewerapp": [
        {
        "root": "src",
        "outDir": "dist",
        . . .
        . . .
        "styles": [],
        "scripts": ["./node_modules/jquery/dist/jquery.js"],
        . . .
        . . .
        }
  2. Remove the src/globals.ts file entirely. Eliminate all references to src/globals.ts file in both the ts.configapp.json and src/app/app.module.ts files.

Having trouble getting help?
Contact Support
Having trouble getting help?
Contact Support