I’m getting this error after installing an AWS package(@aws-sdk/client-dynamodb)
into my typescript project
jsnode_modules@aws-sdkclient-dynamodbdist-cjsprotocolsAws_json1_0.js:3541
ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
^
SyntaxError: Unexpected token ?
This is the set up for my project.(tsconfig.ts)
`
{
"compilerOptions": {
"outDir": "./dist/", // path to output directory
"sourceMap": true, // allow sourcemap support
"strictNullChecks": true, // enable strict null checks as a best practice
"module": "commonjs", // specify module code generation
"allowJs": true, // allow a partial TypeScript and JavaScript codebase
"moduleResolution": "node",
"resolveJsonModule": true,
"esModuleInterop": true,
"baseUrl": ".",
"paths": {
"@config/*": ["config/*"],
"@common/*": ["test/common/*"],
"@models/*": ["test/models/*"]
}
},
"include": [
"./"
]
}
`
This is my package.json
"dependencies": {
"@aws-sdk/client-dynamodb": "^3.218.0",
"@aws-sdk/lib-dynamodb": "^3.218.0",
"ts-node": "^8.10.1",
"tsconfig-paths": "^3.9.0",
"typescript": "^3.8.3"
}
tried changing the typescript version
Overall goal is to have the typescript error away