Rohit verma

Rohit verma

  • NA
  • 54
  • 2.8k

Uncaught ReferenceError: require is not defined

May 14 2021 9:52 AM
Hi,
 
I am facing issue Uncaught ReferenceError: require is not defined when compile the .ts file.
 
It converted into .js file having started from--
 
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Utils_1 = require("../Shared/Utils");
 
this is my tsconfig.json setting--
 
"target": "ES5",
"module": "commonjs",
"lib": ["ES2018", "dom"],
 
i have tried alot of step but still not solve. I am using typescript version 4.2.4.

Answers (2)