nestcloud icon indicating copy to clipboard operation
nestcloud copied to clipboard

Error with @nestcloud/config

Open koolamusic opened this issue 5 years ago • 1 comments

After updating the @nestcloud/config package as well at the @nestcloud/boot modules, I noticed some API changes, where dependencies' are now inject` in some cases and the constants for NEST_CONSUL has been changed to CONSUL

However, the issues I'm having with the config package is with these interfaces,

ERROR in libs/core/src/modules/subscription-base.class.ts:5:28
TS2307: Cannot find module '@nestcloud/config/etcd-config' or its corresponding type declarations.
    3 | import { Logger } from '@nestjs/common';
    4 | import { NatsPubSub } from '@moonwalker/graphql-nats-subscriptions';
  > 5 | import { EtcdConfig } from '@nestcloud/config/etcd-config';
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    6 | 
    7 | export class SubscriptionBaseClass {
    8 |     public pubsub: MQTTPubSub | NatsPubSub;

ERROR in libs/core/src/modules/subscription-base.provider.ts:5:28
TS2307: Cannot find module '@nestcloud/config/etcd-config' or its corresponding type declarations.
    3 | import { Injectable, Logger, OnModuleDestroy, OnModuleInit, Scope } from '@nestjs/common';
    4 | import { NatsPubSub } from '@moonwalker/graphql-nats-subscriptions';
  > 5 | import { EtcdConfig } from '@nestcloud/config/etcd-config';
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    6 | import { InjectConfig } from '@nestcloud/config';
    7 | 
    8 | @Injectable({

ERROR in libs/core/src/services/configs/cache-store-config.service.ts:4:28
TS2307: Cannot find module '@nestcloud/config/etcd-config' or its corresponding type declarations.
    2 | import { InjectConfig } from '@nestcloud/config';
    3 | import { Etcd3 } from 'etcd3';
  > 4 | import { EtcdConfig } from '@nestcloud/config/etcd-config';
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    5 | import redisStore from 'cache-manager-redis-store';
    6 | import * as redis from 'redis';
    7 | 


ERROR in libs/core/src/services/configs/jwt-config.service.ts:2:10
TS2305: Module '"../../../../../node_modules/@nestcloud/config"' has no exported member 'ConsulConfig'.
    1 | import { Injectable, Logger } from '@nestjs/common';
  > 2 | import { ConsulConfig, InjectConfig } from '@nestcloud/config';
      |          ^^^^^^^^^^^^
    3 | import { JwtModuleOptions, JwtOptionsFactory } from '@nestjs/jwt';
    4 | 
    5 | @Injectable()

ERROR in libs/core/src/services/configs/mongo-config.service.ts:3:28
TS2307: Cannot find module '@nestcloud/config/etcd-config' or its corresponding type declarations.
    1 | import { Injectable } from '@nestjs/common';
    2 | import { InjectConfig } from '@nestcloud/config';
  > 3 | import { EtcdConfig } from '@nestcloud/config/etcd-config';
      |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    5 | import { ConsulDatabaseConfig } from '@src/common';

koolamusic avatar Nov 09 '20 08:11 koolamusic

I think the example projects could be updated to reflect these changes.

koolamusic avatar Nov 09 '20 08:11 koolamusic