Breaking change: Cannot find module '@grpc/proto-loader' (@grpc/grpc-js@1.1.4)
envgap__grpc__grpc-node-1550
01 / FAILURE SIGNATURE
As reported upstream
Error: Cannot find module '@grpc/proto-loader'
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
7efc5358e3bb56acbea937fef246524f626da0e5- Manifest
packages/grpc-js/package.json- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
grpc/grpc-node #1550 · read the original issue
### Problem description
`@grpc/grpc-js@1.1.4` crashes on import
```
internal/modules/cjs/loader.js:796
throw err;
^
Error: Cannot find module '@grpc/proto-loader'
Require stack:
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/xds-client.js
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/load-balancer-eds.js
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/load-balancer.js
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/channel.js
- /tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/index.js
- /tmp/test-grpc/index.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/xds-client.js:20:21)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js:723:14)
at Module.require (internal/modules/cjs/loader.js:848:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/xds-client.js',
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/load-balancer-eds.js',
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/load-balancer.js',
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/resolving-load-balancer.js',
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/channel.js',
'/tmp/test-grpc/node_modules/@grpc/grpc-js/build/src/index.js',
'/tmp/test-grpc/index.js'
]
}
```
### Reproduction steps
```
npm init
npm install @grpc/grpc-js@1.1.4
echo "require('@grpc/grpc-js')" > index.js
node index.js
```
### Environment
```
npm -v
6.13.4
node -v
v12.14.1
```
- OS name, version and architecture: `Linux 5.4.57-1-MANJARO #1 SMP PREEMPT Fri Aug 7 09:54:45 UTC 2020 x86_64 GNU/Linux`
- Node version 12.4.1
- Node installation method nvm
- Package name and version @grpc/grpc-js@1.1.4
### Additional context
[Here](https://github.com/grpc/grpc-node/blob/master/packages/grpc-js/src/xds-client.ts#L18) in production code is import of a module that is only in dev dependencies, see stack trace.
Previous version `@grpc/grpc-js@1.1.3` is working correctly. This is a breaking change in semver's patch update.04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]