You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an angular component that is made as a library and it has gRPC client codes in it. Everything works fine when I am testing the gRPC codes in the library itself.
But after I built the component as library, npm pack it and include it inside another angular project's node modules. It would have the below error complaining that the "grpc" module is null
import {grpc} from "@improbable-eng/grpc-web";
I have no idea what is causing the issue, is there anything that I need to import or add in the codes? I have make sure that the @improbable-eng/grpc-web module is indeed installed properly inside the node_modules folder
the package is installed with: npm install google-protobuf @types/google-protobuf @improbable-eng/grpc-web --save
The error returned in the console is: Uncaught TypeError: Cannot read properties of undefined (reading 'grpc') at Module.zUnb (main.10d8e8817d551e6f8d6e.js:1) at l (runtime.acf0dec4155e77772545.js:1) at Object.0 (main.10d8e8817d551e6f8d6e.js:1) at l (runtime.acf0dec4155e77772545.js:1) at t (runtime.acf0dec4155e77772545.js:1) at Array.r [as push] (runtime.acf0dec4155e77772545.js:1) at main.10d8e8817d551e6f8d6e.js:1
In the peerDependencies of the library component's package.json "@improbable-eng/grpc-web": "0.15.0",
has been included too
The text was updated successfully, but these errors were encountered:
This sounds like an environment problem, unfortunately this is really hard to debug without direct access to the environment, so you'll likely have to ask someone who knows more about your setup. Sorry we can't be of more help here, but there's unlikely to be a bug in the client since it works everywhere else.
I have an angular component that is made as a library and it has gRPC client codes in it. Everything works fine when I am testing the gRPC codes in the library itself.
But after I built the component as library, npm pack it and include it inside another angular project's node modules. It would have the below error complaining that the "grpc" module is null
import {grpc} from "@improbable-eng/grpc-web";
I have no idea what is causing the issue, is there anything that I need to import or add in the codes? I have make sure that the @improbable-eng/grpc-web module is indeed installed properly inside the node_modules folder
the package is installed with:
npm install google-protobuf @types/google-protobuf @improbable-eng/grpc-web --save
The error returned in the console is:
Uncaught TypeError: Cannot read properties of undefined (reading 'grpc') at Module.zUnb (main.10d8e8817d551e6f8d6e.js:1) at l (runtime.acf0dec4155e77772545.js:1) at Object.0 (main.10d8e8817d551e6f8d6e.js:1) at l (runtime.acf0dec4155e77772545.js:1) at t (runtime.acf0dec4155e77772545.js:1) at Array.r [as push] (runtime.acf0dec4155e77772545.js:1) at main.10d8e8817d551e6f8d6e.js:1
In the peerDependencies of the library component's package.json
"@improbable-eng/grpc-web": "0.15.0",
has been included too
The text was updated successfully, but these errors were encountered: