Loopback-next: LB4 Npm Run Start stuck when mounting LB3 app

Created on 1 Oct 2019  路  5Comments  路  Source: strongloop/loopback-next

Description/Steps to reproduce

My application hangs when mounting an LB3 app inside the LB4 app
"C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" run start --scripts-prepend-node-path=auto

[email protected] prestart C:\Users*\Desktop\dev*\api-lb4
npm run build

[email protected] build C:\Users*\Desktop\dev*\api-lb4
lb-tsc

[email protected] start C:\Users*\Desktop\dev*\api-lb4
node -r source-map-support/register .

I followed this tutorial exactly: https://github.com/strongloop/loopback-next/tree/master/examples/lb3-application#tutorial

When removing this.component(Lb3AppBooterComponent); from the constructor inside application.ts the application starts fine.

Expected result

Application should run as normal, or prompt some sort of error as to why it can't.

Additional information

I've let this sit for roughly 10 minutes with still no logs of any sort, and the application not running.

My Loopback 3 application runs fine on it's own.

All 5 comments

Transferred to loopback-next as this is related to LB4.

@nabdelgadir, could you please help? Thanks.

@CollinHerber I tried running our example lb3 application and it's running fine on my end, so it might be something specific to your lb3 app. Can you please provide a sample repo that replicates this problem? See Reporting issues: Loopback 4.x Bugs if you need any help. Thanks!

@CollinHerber I tried running our example lb3 application and it's running fine on my end, so it might be something specific to your lb3 app. Can you please provide a sample repo that replicates this problem? See Reporting issues: Loopback 4.x Bugs if you need any help. Thanks!

When I'm home, tonight, I will strip out any of my application specific models and see if I can replicate it with the config files alone. I already started doing this slightly to see if I could pinpoint which portion of the lb3 app was causing these issues. I'll relay any results here. Expect a response within 72 hours.

@nabdelgadir

I was able to find the problem. When following the instructions I put the lb3app folder inside the /src folder.
As soon as I re-read the instructions and noticed it was meant to be at the root of the folder structure, my application now runs fine.

Perhaps this bug could be closed now, but maybe another opened in regards to that? LB4 should prompt if it attempts to load a LB3 application but nothing is found to load.

Thank you! I added a test to verify that an error is thrown when it can't find the lb3 app in https://github.com/strongloop/loopback-next/pull/3963. 馃憤

I'm going to close the issue, but feel free to reopen if there's anything else.

Was this page helpful?
0 / 5 - 0 ratings