Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build #44

Closed
ArtBIT opened this issue Aug 18, 2020 · 14 comments
Closed

Failing to build #44

ArtBIT opened this issue Aug 18, 2020 · 14 comments
Labels
duplicate This issue or pull request already exists

Comments

@ArtBIT
Copy link

ArtBIT commented Aug 18, 2020

In my project, and even with the very basic typescript boilerplate (i.e. https://github.com/jsynowiec/node-typescript-boilerplate), including @hookform/resolvers into the project breaks the build.

> node-typescript-boilerplate@0.0.0 build /code/nodejs/node-typescript-boilerplate
> tsc -p tsconfig.release.json

node_modules/@hookform/resolvers/dist/joi.d.ts:2:17 - error TS2307: Cannot find module '@hapi/joi' or its corresponding type declarations.

2 import Joi from '@hapi/joi';
                  ~~~~~~~~~~~

node_modules/@hookform/resolvers/dist/superstruct.d.ts:2:25 - error TS2307: Cannot find module 'superstruct' or its corresponding type declarations.

2 import Superstruct from 'superstruct';
                          ~~~~~~~~~~~~~

node_modules/@hookform/resolvers/dist/yup.d.ts:2:17 - error TS2307: Cannot find module 'yup' or its corresponding type declarations.

2 import Yup from 'yup';
@ArtBIT
Copy link
Author

ArtBIT commented Aug 18, 2020

Are all devDependencies in package.json truly dev deps?

@bluebill1049 bluebill1049 added the duplicate This issue or pull request already exists label Aug 18, 2020
@bluebill1049
Copy link
Member

#20

we are looking for solutions, yes they r dev dependency if you check the package.json.

@ArtBIT
Copy link
Author

ArtBIT commented Aug 19, 2020

That's what I am saying, shouldn't they be listed as dependencies (not devDependencies) since those packages are imported at runtime, from the dist folder?

@bluebill1049
Copy link
Member

if they are dependencies, then the bundle size would be tripled right? we need to solve the problem not importing other libs.

@ArtBIT
Copy link
Author

ArtBIT commented Aug 20, 2020

Since you only seem to need to import type definitions, maybe you could use https://github.com/DefinitelyTyped/DefinitelyTyped ?
@types/joi
@types/yup
@types/superstruct

@bluebill1049
Copy link
Member

we could try that, i will build a beta version today for you.

@ArtBIT
Copy link
Author

ArtBIT commented Aug 21, 2020

Okay, thank you.

@bluebill1049
Copy link
Member

@hookform/resolvers@0.0.7-beta.3 all dev-dep
@hookform/resolvers@0.0.7-beta.4 all dep

let me know.

@ArtBIT
Copy link
Author

ArtBIT commented Aug 21, 2020

@hookform/resolvers@0.0.7-beta.3 has the same errors:
https://gist.github.com/ArtBIT/341bda5c1f4263fc2bda86630c6263ee

@hookform/resolvers@0.0.7-beta.4 has one less, and slightly different ones.
https://gist.github.com/ArtBIT/cf5015c78bdf1015c79b2895c55f72af

@bluebill1049
Copy link
Member

looks like @hookform/resolvers@0.0.7-beta.3 all dev-dep, looks better... if you install all the @type definition will that solve the problem?

@wolfhoundjesse
Copy link

You can add skipLibCheck to your tsconfig for now.
#20 (comment)

@jorisre
Copy link
Member

jorisre commented Oct 20, 2020

You can add skipLibCheck to your tsconfig for now.
#20 (comment)

Or just install the latest version of @hookform/resolvers :)

@wolfhoundjesse
Copy link

Or just install the latest version of @hookform/resolvers :)

Oh, when was it fixed? I was having this issue last week.

@jorisre
Copy link
Member

jorisre commented Oct 22, 2020

Or just install the latest version of @hookform/resolvers :)

Oh, when was it fixed? I was having this issue last week.

Since ~19 days ago
➡️ Release Note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants