Encountering Error
Error TS2732: Cannot locate module '../service-account.json'. It is suggested to use the '--resolveJsonModule' flag when importing a module with a '.json' extension.
import serviceAccountPlay from '../service-account.json';
I have a file named -> typing.d.ts
declare module "*.json" {
const value: any;
export default value;
}
tsconfig.json
tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"noImplicitReturns": true,
"noUnusedLocals": false,
"outDir": "lib",
"sourceMap": true,
"strict": false,
"resolveJsonModule": true,
"esModuleInterop": true,
"target": "es2017"
},
"compileOnSave": true,
"include": [
"src"
]
}