nestcloud icon indicating copy to clipboard operation
nestcloud copied to clipboard

Can not initialize ServiceModule

Open vincentpham13 opened this issue 5 years ago • 2 comments

[System Information] OS Version : macOS Catalina NodeJS Version : v10.0.0 YARN Version : 1.22.1

[Nest CLI] Nest CLI Version : 7.1.4

[Nest Platform Information] platform-express version : 7.4.2 microservices version : 7.4.2 terminus version : 7.0.1 testing version : 7.4.2 common version : 7.4.2 core version : 7.4.2

I just cloned the nestcloud-grpc-example then upgraded all the nest-cloud modules to the latest versions. but unfortunately, it does not work even if I did not upgrade the version of the modules. here is my terminal logs image

vincentpham13 avatar Aug 01 '20 13:08 vincentpham13

Is your consul started?

tomatofrommars avatar Aug 04 '20 08:08 tomatofrommars

I am having this same issue, can't trace where the error is from, mostly from the consul and Service Discovery

[Nest] 28400   - 11/09/2020, 12:36:22 PM   [ExceptionHandler] Cannot find module 'consul'
Require stack:
- /srv/server/node_modules/@nestcloud/consul/consul.module.js
- /srv/server/node_modules/@nestcloud/consul/index.js
- /srv/server/dist/apps/service-notification/main.js +6ms
Error: Cannot find module 'consul'
Require stack:
- /srv/server/node_modules/@nestcloud/consul/consul.module.js
- /srv/server/node_modules/@nestcloud/consul/index.js
- /srv/server/dist/apps/service-notification/main.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:966:15)
    at Function.Module._load (internal/modules/cjs/loader.js:842:27)
    at Module.require (internal/modules/cjs/loader.js:1026:19)
    at require (internal/modules/cjs/helpers.js:72:18)
    at InstanceWrapper.useFactory [as metatype] (/srv/server/node_modules/@nestcloud/consul/consul.module.js:41:32)
    at Injector.instantiateClass (/srv/server/node_modules/@nestjs/core/injector/injector.js:293:55)
    at callback (/srv/kpilens/server/node_modules/@nestjs/core/injector/injector.js:77:41)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Injector.resolveConstructorParams (/srv/server/node_modules/@nestjs/core/injector/injector.js:118:24)
    at async Injector.loadInstance (/srv/server/node_modules/@nestjs/core/injector/injector.js:81:9)

koolamusic avatar Nov 09 '20 12:11 koolamusic