I'm new to protobuf. I'm using "protobufjs": "^6.8.8" for generating typescript. And imported this generated file to my component.spec.ts , then got compilation error when run ng serve
[ERROR] target/generated-sources-js/xxx.d.ts(4253,40): error TS2304: Cannot find name 'Long'.
I included the "@types/long": "^4.0.0", "long": "^4.0.0", in my package.json dependencies. Still got the same error.
Please advise. Many thanks
You need to add the following configuration
{
"compilerOptions": {
...
"types": [ ..., "Long"]
}
...
}
in the tsconfig.jsonfile
compilerOptions.types add "Long" to array
Greetings! I think we fixed this over in #1166
Is there a plan to release a new version anytime soon? This bug exists in 6.8.8, and the fix was never released.
Most helpful comment
Is there a plan to release a new version anytime soon? This bug exists in 6.8.8, and the fix was never released.