weavy / weavy-uikit-web

Web components UIKit for Weavy.
MIT License
2 stars 0 forks source link

When i use in angular following the instructions weavy throws this... #2

Open nesgarbo opened 2 months ago

nesgarbo commented 2 months ago

Application bundle generation failed. [5.356 seconds] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/connection.d.ts:3:30: [ng] 3 │ ...tion } from '../../@microsoft/signalr/dist/browser/signalr.min.js'; [ng] ╵ ~~~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:104:29: [ng] 104 │ ...?: import('../../@microsoft/signalr/dist/browser/signalr.min.j... [ng] ╵ ~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:113:39: [ng] 113 │ ...n: import('../../@microsoft/signalr/dist/browser/signalr.min.j... [ng] ╵ ~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2339: Property 'getChatToken' does not exist on type 'WeavyService'. [plugin angular-compiler] [ng] [ng] src/app/chat/chat.component.ts:18:42: [ng] 18 │ const token = await this.weavyService.getChatToken(userId); [ng] ╵ ~~~~ [ng] [ng] [ng] X [ERROR] TS2339: Property 'initializeWeavy' does not exist on type 'WeavyService'. [plugin angular-compiler] [ng] [ng] src/app/chat/chat.component.ts:21:30: [ng] 21 │ ...await this.weavyService.initializeWeavy(token, { key: 'chat-spa... [ng] ╵ ~~~ [ng] [ng] [ng] X [ERROR] TS2339: Property 'loadChatComponent' does not exist on type 'WeavyService'. [plugin angular-compiler] [ng] [ng] src/app/chat/chat.component.ts:22:24: [ng] 22 │ this.weavyService.loadChatComponent(this.chatContainer()!); [ng] ╵ ~~~~~ [ng] [ng] [ng] - Changes detected. Rebuilding... [ng] Application bundle generation failed. [0.233 seconds] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/connection.d.ts:3:30: [ng] 3 │ ...tion } from '../../@microsoft/signalr/dist/browser/signalr.min.js'; [ng] ╵ ~~~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:104:29: [ng] 104 │ ...?: import('../../@microsoft/signalr/dist/browser/signalr.min.j... [ng] ╵ ~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:113:39: [ng] 113 │ ...n: import('../../@microsoft/signalr/dist/browser/signalr.min.j... [ng] ╵ ~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS-992008: Could not find stylesheet file './chat.component.css'. [plugin angular-compiler] [ng] [ng] src/app/chat/chat.component.ts:9:12: [ng] 9 │ styleUrl: "./chat.component.css", [ng] ╵ ~~~~~~ [ng] [ng] [ng] - Changes detected. Rebuilding... [ng] Application bundle generation failed. [0.212 seconds] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/connection.d.ts:3:30: [ng] 3 │ ...tion } from '../../@microsoft/signalr/dist/browser/signalr.min.js'; [ng] ╵ ~~~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:104:29: [ng] 104 │ ...?: import('../../@microsoft/signalr/dist/browser/signalr.min.j... [ng] ╵ ~~~~~~~~~~~~ [ng] [ng] [ng] X [ERROR] TS2307: Cannot find module '../../@microsoft/signalr/dist/browser/signalr.min.js' or its corresponding type declarations. [plugin angular-compiler] [ng] [ng] node_modules/@weavy/uikit-web/dist/types/client/weavy.d.ts:113:39: [ng] 113 │ ...n: import('../../@microsoft/signalr/dist/browser/signalr.min.j...

klasjersevi commented 1 month ago

We just released Weavy v24.0.0 which has some fixes for the build. Could you try and see if it resolves your issue?

nesgarbo commented 1 month ago

I'll try, thx

nesgarbo commented 1 month ago

We just released Weavy v24.0.0 which has some fixes for the build. Could you try and see if it resolves your issue?

I have done everything but everywhere says it is still the other version (23)

image

klasjersevi commented 1 month ago

You need to upgrade both the @weavy/uikit-web npm package and your environment to v24.0.0 in your account at https://weavy.com as well.

Please share the package.json file for your project if you still experience build problems after upgrading to v24.0.0.

nesgarbo commented 1 month ago

Ok, mb. I realized that I hadn't recompiled the core.

Now it is already 24.0.0, and weavy-uikit-web is showing the same error. I'm using Angular 18 and esbuild.

Any recommendations?

klasjersevi commented 1 month ago

Ok, I think I need more info here. Did you install the npm package or are you using the GitHub repo? If you could share your package.json, that would help.

nesgarbo commented 1 month ago

I have installed the npm package and it works fine in an angular 18 project, but not in an ionic one. In this one i have just created for example throws same error: The package.json: "@angular/animations": "^18.0.0", "@angular/common": "^18.0.0", "@angular/compiler": "^18.0.0", "@angular/core": "^18.0.0", "@angular/forms": "^18.0.0", "@angular/platform-browser": "^18.0.0", "@angular/platform-browser-dynamic": "^18.0.0", "@angular/router": "^18.0.0", "@capacitor/app": "6.0.0", "@capacitor/core": "6.1.0", "@capacitor/haptics": "6.0.0", "@capacitor/keyboard": "6.0.1", "@capacitor/status-bar": "6.0.0", "@ionic/angular": "^8.0.0", "@weavy/uikit-web": "^24.0.1", "ionicons": "^7.2.1", "rxjs": "~7.8.0", "tslib": "^2.3.0", "zone.js": "~0.14.2"

CleanShot 2024-07-15 at 12 38 47@2x CleanShot 2024-07-15 at 12 39 27@2x

klasjersevi commented 1 month ago

Thank you for the info. You can try installing the @microsoft/signalr package as a workaround. I'll take a deeper look at this when I'm back from vacation.