getting an error while transpile, tsc --project ./tsconfig.build.json
node_modules/class-validator/validation/Validator.d.ts:383:38 - error TS2503: Cannot find namespace 'ValidatorJS'.
383 isISSN(value: unknown, options?: ValidatorJS.IsISSNOptions): boolean;
I am getting the same issue
Setting "esModuleInterop": true in compilerOptions in tsconfig.json file fixed it
Setting
"esModuleInterop": trueincompilerOptionsintsconfig.jsonfile fixed it
I am getting the same issue and setting "esModuleInterop": true doesn't work for me.
I found that there is @types/validator in node_modules which is installed due to sequelize-typescript as peerDependencies. But it has the newer version("12.0.1").
setting "skipLibCheck": true in compilerOptions worked for me
I fixed the issue by setting @types/validator in devDependencies:
"devDependencies": {
...
"@types/validator": "13.0.0",
...
},
"dependencies": {
...
"class-validator": "0.12.2",
"class-transformer": "0.2.3",
"class-transformer-validator": "0.8.0"
...
}
Setting "skibLibCheck": true would 'fix' the compiler error but you might as well NOT be using TS - so fail to understand the 12 upvotes.
Please try [email protected]. It should be fixed
Closing in favour of https://github.com/typestack/class-validator/issues/468
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
setting "skipLibCheck": true in
compilerOptionsworked for me