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

Exported types have bad imports and there's no "types" record in package.json #124

Closed
pbitkowski opened this issue Sep 10, 2021 · 2 comments

Comments

@pbitkowski
Copy link

Hi,

Your package looks great, kudos for building it! I would love to use it but when I import it I get TypeScript error:

TS2307: Cannot find module 'react-notifications-component' or its corresponding type declarations.

I checked your index.d.ts and see:

import container from 'src/components/Container';
import store from 'src/store';
export { store };
export default container;

Where there's no src directory

Also in package.json there's no "types" record that would indicate where to search types.

Repro:
https://codesandbox.io/s/relaxed-saha-4sxqn?file=/src/App.tsx

I could help you with exporting types if you want :)

@OkancanCosar
Copy link

is it about installing types?
yarn add @types/react-notifications-component

@teodosii
Copy link
Owner

teodosii commented Jan 22, 2022

The declarations are in the build folder, but for some reason the index.d.ts had the imports referenced from src instead of . Watch out for the next release, will have this fixed.

@pbitkowski

Fixed in 3.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants