When instantiating a DaprClient, i get the following error in Browser console:
TypeError: Class extends value undefined is not a constructor or null
at node_modules/@grpc/grpc-js/build/src/call.js (call.ts:88:11)
at require2 (chunk-OROXOI2D.js?v=e658d520:16:50)
at node_modules/@grpc/grpc-js/build/src/client.js (client.ts:18:1)
at __require2 (chunk-OROXOI2D.js?v=e658d520:16:50)
at node_modules/@grpc/grpc-js/build/src/make-client.js (make-client.ts:20:1)
at require2 (chunk-OROXOI2D.js?v=e658d520:16:50)
at node_modules/@grpc/grpc-js/build/src/channelz.js (channelz.ts:60:1)
at __require2 (chunk-OROXOI2D.js?v=e658d520:16:50)
at node_modules/@grpc/grpc-js/build/src/subchannel.js (subchannel.ts:30:1)
at __require2 (chunk-OROXOI2D.js?v=e658d520:16:50)
Steps to Reproduce the Problem
Use node v20.9.0, npm 10.2.3 (in my case on linux)
I have a Vue3 (3.3.8) app setup with Quasar.
For this, i installed Quasar as described in the docu:
npm i -g @quasar/cli
npm init quasar
choose:
App with Quasar CLI
Pick Quasar v2 (Vue3)
Pick Typescript
Pick Quasar App CLI with Vite
Pick Composition API
SASS with SCSS
Features: just the default 'ESLint'
Prettier
Install with npm
Install @dapr/dapr (or @dapr/dapr-dev)
My component instantiates a DaprClient like this:
<script lang="ts">
import { defineComponent, ref } from 'vue';
import {
DaprClient,
HttpMethod,
CommunicationProtocolEnum,
} from '@dapr/dapr-dev';
onst daprHost = '127.0.0.1'; // Dapr Sidecar Host
const daprPort = '3500'; // Dapr Sidecar Port of this Example Server
const serverHost = '127.0.0.1'; // App Host of this Example Server
const serverPort = '50051'; // App Port of this Example Server
export default defineComponent({
setup() {
runFullCheck(): void {
alert('Full check');
const daprClient = new DaprClient({
daprHost,
daprPort,
communicationProtocol: CommunicationProtocolEnum.HTTP,
});
},
}
});
</script>
Run the app with:
npx quasar dev
When commenting out const daprClient = new DaprClient ..., everything is OK.
Expected Behavior
No error in Browser console
Actual Behavior
When instantiating a DaprClient, i get the following error in Browser console:
Steps to Reproduce the Problem
Use node v20.9.0, npm 10.2.3 (in my case on linux)
I have a Vue3 (3.3.8) app setup with Quasar. For this, i installed Quasar as described in the docu:
Install @dapr/dapr (or @dapr/dapr-dev)
My component instantiates a DaprClient like this:
Run the app with: npx quasar dev
When commenting out
const daprClient = new DaprClient ...
, everything is OK.