You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use injectable services (via @injectable decorator) in lib and try to link that lib to my app, I got an error.
But when I use same lib directly in app (via npm install, or just by copying builded lib in app's node_modules for example), error not appears.
To Reproduce
I made a repo with lib and app that uses lib.
NOTE! Please use bash or zsh while reproducing. I not so good in using windows cmd or powershell, so some commands wouldn't works in windows as planned.
Linked repo seems to be working in Inversify. Leaving it here in case you guys could make use of it, you can see it working in commit 0b0e2afc162e42ccbccad053f2a40de340f3f4f1 on my repo.
florian-g2
added a commit
to florian-g2/tsyringe
that referenced
this issue
Jun 25, 2022
Describe the bug
When I use injectable services (via
@injectable
decorator) in lib and try to link that lib to my app, I got an error.But when I use same lib directly in app (via npm install, or just by copying builded lib in app's
node_modules
for example), error not appears.To Reproduce
I made a repo with lib and app that uses lib.
NOTE! Please use
bash
orzsh
while reproducing. I not so good in using windows cmd or powershell, so some commands wouldn't works in windows as planned.Prepearing
A symlink "@my/library" must appears in app's
node_modules
after this steps.Building and running app
Then we'll trying to build our app:
Build must be successful if you did all right. After build, we'll trying to run our app:
And we got error with these reason:
BUT! If we publish our lib to repo and install it in app or just copy builded lib to app, all things will be fine.
Use library without symlinks
Copy library directly in app
And then repeat build and run:
Now all works fine!
Expected behavior
An error
TypeInfo not known for ...
shouldn't appears when I use npm link.Both methods -
npm link lib
andnpm install lib
- must works well.Version: ^4.5.0
The text was updated successfully, but these errors were encountered: