Angular-RU / angular-ru-sdk

πŸ…°οΈ ngular-RU Software Development Kit
71 stars 16 forks source link

🐞 - Cannot find module '@angular-ru/ngxs' or its corresponding type declarations #1513

Closed ishanuda closed 11 months ago

ishanuda commented 11 months ago

Which @angular-ru/* package(s) are the source of the bug?

cdk, ngxs

Is this a regression?

Yes

Description

Hi, I am getting the following type error when trying to update the following packages with ngxs/store

Cannot find module '@angular-ru/ngxs' or its corresponding type declarations Cannot find module '@angular-ru/cdk/entity' or its corresponding type declarations

@angular-ru/cdk@14.11.0 @angular-ru/ngxs@14.2.0

Environment:

NodeJS: v14.21.3 || 16.20.2 TypeScript: v4.8.4 Angular: v15.2.10 ngxs/store: v3.8.1

Note: also I tried with the lower versions such as "@angular-ru/ngxs": "^14.1.2" and above, did not work.

Once I installed the "@angular-ru/ngxs": "^14.1.2" the following message is removing. "Cannot find module '@angular-ru/ngxs' or its corresponding type declarations"

But then I get the following type error: Cannot find module '@angular-ru/cdk/entity' or its corresponding type declarations

Note: I only try to change the version of the @angular-ru/ngxs while the @angular-ru/cdk version is at ^14.11.0".

clark-stevenson commented 11 months ago

I am also having what I think is a related issue. I haven't changed app.module.ts for a long time but whilst updating dependencies, all of a sudden I get:

Cannot find module '@angular-ru/cdk/logger' or its corresponding type declarations

from:

import { LoggerLevel, LoggerModule } from '@angular-ru/cdk/logger';

I have tried a fresh install of node_modules and cleaned the cache etc but no luck.

ishanuda commented 11 months ago

OK,

Installing the lower versions with @ngxs/store v3.8.1 solved the import issue.

@angular-ru/cdk@14.10.1 @angular-ru/ngxs@14.1.4

splincode commented 11 months ago

@Markiewic hello, could you help me? Upgrade that repo to angular 16

Markiewic commented 11 months ago

Hola! I looked, it turns out that in the latest versions, instead of building, the source code was published to npm. This is why the import error occurs. Angular 16 most likely has nothing to do with it. I'll see what the problem is and make an update.

splincode commented 11 months ago

@Markiewic thank you very much!

Markiewic commented 11 months ago

@ishanuda @clark-stevenson I think I fixed it. Try new versions of libraries: @angular-ru/cdk@14.11.2 @angular-ru/ngxs@14.2.2

Markiewic commented 11 months ago

Sorry guys, but apparently it’s my fault that the source code was published to npm. Judging by the fact that in CI the build and publication went correctly, but ended with npm responding that such a version had already been published, perhaps I ran the publish command locally, and what was currently in node_modules/@angular-ru (a symbolic link to source folder) was sent to npm. Most likely this happened when I was fixing the publication with lerna.

clark-stevenson commented 11 months ago

@Markiewic

It solved my problem. Thanks for your quick response πŸ˜„

ishanuda commented 11 months ago

@Markiewic, @splincode,

Thank you for the response. May I know what versions of the following libraries are supported with Angular v15.

@angular-ru/cdk @angular-ru/ngxs

According to the Angular-RU versioning, it appears to be that the library is compatible with Angular v14.

Markiewic commented 11 months ago

@ishanuda These libraries should be supported by Angular 15 since its release. Are you having any issues?

ishanuda commented 11 months ago

@Markiewic, Thank you for the response.

I had a concern of versioning according to the documentation. If there is any issue I will report here.