2
Answers

Uncaught ReferenceError: require is not defined

Rohit verma

Rohit verma

3y
2.9k
1
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)