'long' import error
envgap__grpc__grpc-node-2111
01 / FAILURE SIGNATURE
As reported upstream
The latest version 0.6.10 has error with importing 'long', and as a result I can not compile. Error log comes like this.
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
f457a9bfa102fc4c7a7213ac0f926346baa49036- Manifest
packages/proto-loader/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
grpc/grpc-node #2111 · read the original issue
### Problem description
The latest version 0.6.10 has error with importing 'long', and as a result I can not compile. Error log comes like this.
```
node_modules/@grpc/proto-loader/build/src/index.d.ts:22:10 - error TS2617: 'Long' can only be imported by using 'import Long = require("long")' or by turning on the 'esModuleInterop' flag and using a default import.
22 export { Long } from 'long';
```
### Reproduction steps
I can compile with dependency below.
```
"@grpc/proto-loader": {
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.9.tgz",
"integrity": "sha512-UlcCS8VbsU9d3XTXGiEVFonN7hXk+oMXZtoHHG2oSA1/GcDP1q6OUgs20PzHDGizzyi8ufGSUDlk3O2NyY7leg==",
"requires": {
"@types/long": "^4.0.1",
"lodash.camelcase": "^4.3.0",
"long": "^4.0.0",
"protobufjs": "^6.10.0",
"yargs": "^16.2.0"
}
},
```
I cannot compile with dependency below.
```
"@grpc/proto-loader": {
"version": "0.6.10",
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.6.10.tgz",
"integrity": "sha512-TM2ghLt8pchK+XAlytMJ7RQvSqAb75c8kdizk6PuscNOT8aLYUL/CWESGLvp5GiDsWb6Gzs/VEen1M0e43ggZw==",
"optional": true,
"requires": {
"@types/long": "^4.0.1",
"lodash.camelcase": "^4.3.0",
"long": "^5.2.0",
"protobufjs": "^6.10.0",
"yargs": "^16.2.0"
}
},
```
### Environment
- MacOS Big Sur
- node version: 14.17.3
- Node installation method : nvm
### Additional context
I had been building without any problem until yesterday. The error came out today.04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]