#Erro when using ScheduleModule in nest.js 10 but the code worked perfectly in 9

1 messages · Page 1 of 1 (latest)

upper pasture
#

can you run npx nest info

plucky bolt
#

yes

#
NodeJS Version : v18.15.0
NPM Version    : 9.5.0 

[Nest CLI]
Nest CLI Version : 10.0.3 

[Nest Platform Information]
platform-express version : 10.0.2
mapped-types version     : 2.0.0
schematics version       : 10.0.1
passport version         : 10.0.0
schedule version         : 3.0.1
testing version          : 10.0.2
common version           : 10.0.2
config version           : 3.0.0
core version             : 10.0.2
jwt version              : 10.1.0
cli version              : 10.0.3```
upper pasture
#

what about npm ls @nestjs/core? looks like you got more than one @nestjs/core loaded in your app

#

yep, that's the issue

plucky bolt
#

what should I do

#

or nvm, I'll figure it out

#

thanks for your help

upper pasture
#

rm -rf node_modules :p

plucky bolt
#

I did that already with a clean install

#

I'll keep going through it

upper pasture
#

then I´d do rm package-lock.json

plucky bolt
#

ah duh

#

lol, thanks for your help

#

I used the package: ```npm-check-updates

#

probably should have done it manually

mystic magnet
#

Do you solved this issue @plucky bolt ? I face with same issue now, and try to update the package but it's still buggy Cannot find module '@nestjs/schedule' or its corresponding type declarations.

plucky bolt
#

yes I solved this issue, it was due to having multiple versions of nestjs installed

#

delete the package-lock.json and delete npm module and do a brand new install

#

manually update your package.json with the latest version of nest before doing this