class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

fix: Prevent error TS7016 by restoring `@types/validator` to `dependencies`

Open KeithGillette opened this issue 3 years ago • 5 comments

Description

Restores @types/validator to dependencies rather than devDependencies in package.json so that consuming projects don't need to manually install @types/validator (which is a step not included in the README).

Checklist

  • [X] the pull request title describes what this PR does (not a vague title like Update index.md)
  • [X] the pull request targets the default branch of the repository (develop)
  • [X] the code follows the established code style of the repository
    • npm run prettier:check passes
    • npm run lint:check passes
  • [N/A] tests are added for the changes I made (if any source code was modified)
  • [N/A] documentation added or updated
  • [X] I have run the project locally and verified that there are no errors

Fixes

fixes #1412 & #1535

KeithGillette avatar Feb 26 '22 21:02 KeithGillette

@NoNameProvided Could you merge this? The package is currently broken.

mohd-akram avatar Mar 03 '22 08:03 mohd-akram

Hi @KeithGillette , in the package-lock.json file the lockfileVersion is 1 and not 2, so you are using an old version of NPM. Try to install the dependencies again with the newer version of NPM or with Node v14/v16.

tahubu avatar Apr 07 '22 23:04 tahubu

Thanks, @tahubu. I was using [email protected] / [email protected]. I rebased on develop and used [email protected] / [email protected] to update the PR.

KeithGillette avatar Apr 08 '22 00:04 KeithGillette

Hi, @tahubu — Can this PR be reviewed? Thanks.

KeithGillette avatar Apr 17 '22 14:04 KeithGillette

I would appreciate this be looked at and merged as this is breaking TypeScript builds when upgrading to the new version. This is very hard to debug for newbies.

aleccool213 avatar Sep 08 '22 20:09 aleccool213

Fixed and landed in https://github.com/typestack/class-validator/commit/12f8d86d8507563dfb8e53b6c2e7c490c08e121e.

(I don't allow contributions to package-lock.json due to security reasons.)

NoNameProvided avatar Nov 20 '22 19:11 NoNameProvided

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Dec 21 '22 00:12 github-actions[bot]