← All tasks
javascriptgrpc/grpc-node #572Not a task: not reproduced

Cannot compile TypeScript hello world client/server

envgap__grpc__grpc-node-572

01 / FAILURE SIGNATURE

As reported upstream

node_modules/grpc/index.d.ts:2:55 - error TS7016: Could not find a declaration file for module 'protobufjs'. '.../grpc-example/node_modules/protobufjs/dist/protobuf.js' implicitly has an 'any' type.
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
073dc563858a2d74bd114e5cc50d02203123078f
Manifest
packages/grpc-native-core/package.json
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

grpc/grpc-node #572 · read the original issue
I was following the [quickstart document](https://grpc.io/docs/quickstart/node.html) to implement the hello world client server example in TypeScript.



I can compile and run the code fine if I have `noImplicitAny` set to `false` in `tsconfig.json`.  However, if I have it set to `true`, I get the following error when running `tsc -p .`:

```

node_modules/grpc/index.d.ts:2:55 - error TS7016: Could not find a declaration file for module 'protobufjs'. '.../grpc-example/node_modules/protobufjs/dist/protobuf.js' implicitly has an 'any' type.

  Try `npm install @types/protobufjs` if it exists or add a new declaration (.d.ts) file containing `declare module 'protobufjs';`



2   import { Message, Service as ProtobufService } from "protobufjs";

                                                        ~~~~~~~~~~~~

```

Also, running `npm install @types/protobufjs` does not resolve the issue.



### Environment

 - OS name, version and architecture: OS X Mojave

 - Node version: 8.9.1

 - Node installation method: nvm

 - Package name and version: @grpc/proto-loader@0.3.0, grpc@1.15.1

Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]