In the journey of programming, errors are like unwanted but important companions.
So today I met with a new companion, a new error when I was trying to use the DateGenerator from random-date-generator by below way:
Error Message :
error TS2591: Cannot find name 'require'. Do you need to install tsconfig.
Error Fix Code :
Replace the below code
import DateGeneration from "random-date-generator"
Hope this is helpful, Thank you.
Reference: https://stackoverflow.com/questions/31173738/typescript-getting-error-ts2304-cannot find-name-require