-
I'm having trouble running my nestjs application when I get this error. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Hello, please provide us with more information about the installed packages and their versions. |
Beta Was this translation helpful? Give feedback.
-
I have* cron 3.1.1* installed
I tried installing ***@***.***/cron 2.4.0* and got the message: "This is a stub
types definition. cron provides its own type definitions, so you do not
need this installed"
Despite installing *cron *or ***@***.***/cron* I still get the error
*error TS2688: Cannot find type definition file for 'cron'.*
* The file is in the program because:*
* Entry point for implicit type library 'cron' when running nestjs
application*
I tried deleting the node_modules and package-lock.json folders and running
the npm install command again but still no success.
This error occurs on Windows OS. Not on macOS.
Vào CN, 15 thg 10, 2023 vào lúc 19:21 Pierre Cavin <
***@***.***> đã viết:
… Hello, please provide us with more information about the installed
packages and their versions.
Which version of cron are you using? Are you trying to use it with
@types/cron?
—
Reply to this email directly, view it on GitHub
<#717 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANV7QX3KA6G3BG5BXABNQ73X7PIMDANCNFSM6AAAAAA6AO7CAI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes of course I did that.
I tried upgrading typescript to the latest version but could not fix this
error.
I think there's something wrong with my computer's typescript compiler.
I tried searching for this error but it seems no one has encountered it
Vào CN, 15 thg 10, 2023 vào lúc 23:46 Pierre Cavin <
***@***.***> đã viết:
… You need to remove @types/cron, we shop types with the package since 2.4.0
.
—
Reply to this email directly, view it on GitHub
<#717 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANV7QX66SRW4SDGZCXPH6H3X7QHMTANCNFSM6AAAAAA6AO7CAI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
[image: image.png][image: image.png]
You can see the error message in line 1 of the tsconfig.json file
Vào CN, 15 thg 10, 2023 vào lúc 23:51 Nguyễn Ngọc Duy <
***@***.***> đã viết:
… Yes of course I did that.
I tried upgrading typescript to the latest version but could not fix this
error.
I think there's something wrong with my computer's typescript compiler.
I tried searching for this error but it seems no one has encountered it
Vào CN, 15 thg 10, 2023 vào lúc 23:46 Pierre Cavin <
***@***.***> đã viết:
> You need to remove @types/cron, we shop types with the package since
> 2.4.0.
>
> —
> Reply to this email directly, view it on GitHub
> <#717 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ANV7QX66SRW4SDGZCXPH6H3X7QHMTANCNFSM6AAAAAA6AO7CAI>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
-
You should either upgrade |
Beta Was this translation helpful? Give feedback.
You should either upgrade
cron
to>=2.4.4
or install@types/cron
pinned to2.0.1
(which is the latest version before it was replaced by a stub). We recommend upgradingcron
since we started shipping the types with the package in2.4.0
!If you are using
cron@>=2.4.4
, remember to remove@types/cron
from your dev dependencies 😉