I am trying to mount an LB3 app onto LB4.
I have my loopback 3 app put in the folder /lb3app (which by the way needs to be updated in the lb3 mount docs as it still says to put in /legacy :) ). I have been able to handle all the errors coming up with this transition, but I am currently stuck.
Throws error on npm start
[[Jun14 13:33:54.473]] [ERROR] Cannot start the application. Error: Tag not resolved for Function value
at Schema.getTagObject (/node_modules/yaml/dist/schema/index.js:238:13)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:293:32)
at Pair.toString (/node_modules/yaml/dist/schema/Pair.js:127:33)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:292:52)
at nodes.items.reduce (/node_modules/yaml/dist/schema/Collection.js:119:28)
at Array.reduce (<anonymous>)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Collection.js:100:30)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Map.js:83:18)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:295:155)
at Pair.toString (/node_modules/yaml/dist/schema/Pair.js:127:33)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:292:52)
at nodes.items.reduce (/node_modules/yaml/dist/schema/Collection.js:119:28)
at Array.reduce (<anonymous>)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Collection.js:100:30)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Map.js:83:18)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:295:155)
at Pair.toString (/node_modules/yaml/dist/schema/Pair.js:127:33)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:292:52)
at nodes.items.reduce (/node_modules/yaml/dist/schema/Collection.js:119:28)
at Array.reduce (<anonymous>)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Collection.js:100:30)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Map.js:83:18)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:295:155)
at Pair.toString (/node_modules/yaml/dist/schema/Pair.js:127:33)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:292:52)
at nodes.items.reduce (/node_modules/yaml/dist/schema/Collection.js:119:28)
at Array.reduce (<anonymous>)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Collection.js:100:30)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Map.js:83:18)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:295:155)
at Pair.toString (/node_modules/yaml/dist/schema/Pair.js:127:33)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:292:52)
at nodes.items.reduce (/node_modules/yaml/dist/schema/Collection.js:119:28)
at Array.reduce (<anonymous>)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Collection.js:100:30)
at YAMLMap.toString (/node_modules/yaml/dist/schema/Map.js:83:18)
at Schema.stringify (/node_modules/yaml/dist/schema/index.js:295:155)
at Document.toString (/node_modules/yaml/dist/Document.js:646:32)
at String (<anonymous>)
at Object.stringify (/node_modules/yaml/dist/index.js:87:10)
at /node_modules/swagger2openapi/index.js:1336:48
at new Promise (<anonymous>)
at Object.convertObj (/node_modules/swagger2openapi/index.js:1333:28)
at Lb3AppBooter.buildOpenApiSpec (/node_modules/@loopback/booter-lb3app/src/lb3app.booter.ts:91:42)
at Lb3AppBooter.load (/node_modules/@loopback/booter-lb3app/src/lb3app.booter.ts:58:29)
at process._tickCallback (internal/process/next_tick.js:68:7)
should start api on npm start and mount LB3 app.
@nabdelgadir, could you PTAL? Thanks.
Can you please provide a small application we can use to debug the problem? (See http://loopback.io/doc/en/contrib/Reporting-issues.html#bug-report)
@nabdelgadir
Hi, I've got the same issue trying to mount our lb3 API in lb4. After some basic testing, it appears to be related to models with embedsMany relations. ( I have not tested all other relations )
Here's a simple application reproducing the issue: https://github.com/Itokoyamato/lb4-mounting-test
I tried to use an app as basic as possible using lb3 and lb4 docs. (npm i && npm start should give you the error)
Disabling the relation, the app boots alright.
Sorry for the late response. I'm still looking into it but just as an update, the problem seems to be coming from this call.
Should be fixed as part of https://github.com/strongloop/loopback-next/pull/3269.