Skip to content

Fix resolution of middleware modules [2.x]#222

Merged
davidcheung merged 1 commit into2.xfrom
fix/middleware-outside-node-modules-2x
Oct 12, 2016
Merged

Fix resolution of middleware modules [2.x]#222
davidcheung merged 1 commit into2.xfrom
fix/middleware-outside-node-modules-2x

Conversation

@bajtos
Copy link
Copy Markdown
Member

@bajtos bajtos commented Oct 12, 2016

Fix the code loading "loopback#errorhandler" (for example) to correctly look up the "loopback" module in node_modules of the bootstrapped application, instead of looking it up in node_modules of loopback-boot.

Note that I am intentionally not including any unit-tests, because setting up a correct directory layout reproducing the problem is too difficult.

@davidcheung please review.

I am intentionally sending the PR against the 2.x branch, please forward-port it to your refactor pull request #181.

cc @kraman This should fix the issue you reported in our chat.
cc @raymondfeng

Fix the code loading "loopback#errorhandler" (for example) to correctly
look up the "loopback" module in node_modules of the bootstrapped
application, instead of looking it up in node_modules of loopback-boot.
@davidcheung
Copy link
Copy Markdown
Contributor

@slnode test please

Copy link
Copy Markdown
Contributor

@kraman kraman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Tested against my installation and fix works. Thanks @bajtos

Copy link
Copy Markdown
Contributor

@davidcheung davidcheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@davidcheung davidcheung merged commit d9e744a into 2.x Oct 12, 2016
@davidcheung davidcheung deleted the fix/middleware-outside-node-modules-2x branch October 12, 2016 18:20
@bajtos
Copy link
Copy Markdown
Member Author

bajtos commented Oct 13, 2016

Released in loopback-boot@2.23.0, enjoy :)

davidcheung pushed a commit that referenced this pull request Oct 20, 2016
Fix the code loading "loopback#errorhandler" (for example) to correctly
look up the "loopback" module in node_modules of the bootstrapped
application, instead of looking it up in node_modules of loopback-boot.

[forward-port of #222]
davidcheung pushed a commit that referenced this pull request Oct 26, 2016
Fix the code loading "loopback#errorhandler" (for example) to correctly
look up the "loopback" module in node_modules of the bootstrapped
application, instead of looking it up in node_modules of loopback-boot.

[forward-port of #222]
davidcheung pushed a commit that referenced this pull request Nov 11, 2016
Fix the code loading "loopback#errorhandler" (for example) to correctly
look up the "loopback" module in node_modules of the bootstrapped
application, instead of looking it up in node_modules of loopback-boot.

[forward-port of #222]
davidcheung pushed a commit that referenced this pull request Nov 22, 2016
Fix the code loading "loopback#errorhandler" (for example) to correctly
look up the "loopback" module in node_modules of the bootstrapped
application, instead of looking it up in node_modules of loopback-boot.

[forward-port of #222]
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

Successfully merging this pull request may close these issues.

3 participants