weiran-zsd / dts-cli

Zero-config CLI for TypeScript package development
MIT License
442 stars 23 forks source link

try to create private custom library with dts storybook but building error occurred #173

Closed faizerturk closed 2 years ago

faizerturk commented 2 years ago

So I try to create a custom private library by using dts storybook template with yarn 3, what I do is creating dts storybook template and I use that repo only for storybook. Further more I push it that repo to git as private and I call that repo in my main projects as dependency like : "project-name": "git+ssh://......" , When I do yarn install , the project comes into external libraries :

Screen Shot 2022-09-01 at 11 02 06

but when I call one of story in this way I have an error like :

Module not found: Error: Can't resolve 'further-react-common' in '/Users/macbookpro/Projects/further-storybook-ts/src' and TS2307: Cannot find module 'further-react-common' or its corresponding type declarations.

Screen Shot 2022-09-01 at 11 02 43 Screen Shot 2022-09-01 at 11 03 40 Screen Shot 2022-09-01 at 11 03 36

I think it's a building error, when I install the dts-storybook projects into my main project it comes without building

aladdin-add commented 2 years ago

seems your further-react-common's build result was not found, as you were using "project-name": "git+ssh://......" ,.

you can:

  1. just simply run build & publish to npmjs.
  2. or unignore the '/dist' files, and git push.