You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression
[x ] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
When trying to build a project that uses @nestjs/schedule (either by running yarn build, nest build or yarn run tsc --build) and has strict: true set in tsconfig.json, a Typescript error halts the process:
node_modules/@nestjs/schedule/dist/scheduler.registry.d.ts:1:25 - error TS7016: Could not find a declaration file for module 'cron'. '/Users/roberto/Dev/nest/scheduler-bug/node_modules/cron/lib/cron.js' implicitly has an 'any' type.
Try `npm install @types/cron` if it exists or add a new declaration (.d.ts) file containing `declare module 'cron';`
1 import { CronJob } from 'cron';
~~~~~~
Found 1 error(s).
Expected behavior
Build should be able to finish without errors. A workaround is manually installing @types/cron, but as the user of the library I don't expect to install additional dependencies. A probable fix is to add @types/cron to the project dependencies (right now it is a dev dependency).
Minimal reproduction of the problem with instructions
A workaround is manually installing @types/cron, but as the user of the library I don't expect to install additional dependencies. A probable fix is to add @types/cron to the project dependencies (right now it is a dev dependency).
It's not a workaround. If you enable strict: true but don't enable skipLibCheck: true at the same time, you must install types. This is the desired behavior.
I'm submitting a...
Current behavior
When trying to build a project that uses
@nestjs/schedule
(either by runningyarn build
,nest build
oryarn run tsc --build
) and hasstrict: true
set intsconfig.json
, a Typescript error halts the process:Expected behavior
Build should be able to finish without errors. A workaround is manually installing
@types/cron
, but as the user of the library I don't expect to install additional dependencies. A probable fix is to add@types/cron
to the project dependencies (right now it is a dev dependency).Minimal reproduction of the problem with instructions
Minimal reproduction repo
Just clone it and run
yarn && yarn build
.What is the motivation / use case for changing the behavior?
Environment
The text was updated successfully, but these errors were encountered: