create-react-library icon indicating copy to clipboard operation
create-react-library copied to clipboard

Can't resolve 'my-library' in example\src

Open lev1rand opened this issue 4 years ago • 3 comments

After downloading repository from github I must install dependencies for my-library. I do npm install. But somehow my 'example-project' inside doesn't see my-library. It writes image

Why does it happen and how to fix it?

example's package.json: image

lev1rand avatar Jan 19 '21 12:01 lev1rand

I am also getting this same issue with a freshly created library without any modifications. I've tried tinkering with the package location using various path formats i.e. ../ ~/ etc all without success.

It looks like this issue may also be related to another one previously raised: #293

ShaneYu avatar Jan 20 '21 11:01 ShaneYu

@lev1rand I was able to get around this issue using yarn and tweaking the example/package.json dependency paths. Take a look at the following post to see if this helps you: https://github.com/transitive-bullshit/create-react-library/issues/293#issuecomment-763548386

ShaneYu avatar Jan 20 '21 11:01 ShaneYu

@ lev1rand Мне удалось обойти эту проблему, используя yarnи настраивая пути зависимостей example / package.json. Посмотрите, поможет ли это вам в следующем сообщении: # 293 (комментарий)

Very thankful for your answer :)

lev1rand avatar Jan 26 '21 06:01 lev1rand