-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Builds fail in pnpm projects using @loopback/rest 1.0.1 #1917
Comments
@mgabeler-lee-6rs Thank you for the reporting the issue. Would you like to submit a patch? |
Working on it ... trying to work out the minimal / proper fix and a good test case to at least verify my patch locally |
What I'm not sure how to handle is that I think It seems that |
Thank you @mgabeler-lee-6rs for reporting the problem and sending a pull request to fix it. To be honest, I am confused on why we have to include IMO, it should be enough to list the two Thoughts? |
While you're only importing types from I'll look into this some to see if I can find a slimmer solution than the one merged here. |
I think we need to distinguish between compile-time and run-time. At compile-time, we are importing type definitions for configuration options directly from Since we are loading the typings only, I don't see what would trigger a load of https://github.com/strongloop/loopback-next/search?q=serve-static&unscoped_q=serve-static At runtime, we call
That would be great 👍 I think the only change we need here is to remove |
The lines like this, from your code search, will try to load the actual code, unless I'm seriously missing something:
Even though only the types are needed, it's still going to try to load up the module code, including at runtime, from what I understand. It certainly tries to do so at build time -- after all, In the context of |
|
Huh ... I guess so! I'll submit a second PR to clean that up! |
Well, it seems that this didn't actually fix the problem :( I think the issue is that I added them to the |
Description / Steps to reproduce / Feature proposal
Trying to use loopback 4 1.0.0/1 in a
pnpm
project.Current Behavior
Project fails to build due to
@loopback/rest
package relying onnpm
providing transitive dependencies to it, specifically forserve-static
andexpress-serve-static-core
Expected Behavior
@loopback/
packages should declare all their dependencies so that they work with stricter package managers likepnpm
Example error output:
The
../../common/temp/...
is because this is also a project in a rush monorepoWorkaround
Add packages to my project's dependencies:
serve-static
express-serve-static-core
@types/serve-static
@types/express-serve-static-core
express-serve-static-core
(which is the sole content of that module) get used, which are wrongThe text was updated successfully, but these errors were encountered: