I have a nodejs typescript monorepo set up in the below structure
libraries/
lib1/
lib2/
package.json
tsconfig.json
web-api/
function1/
function.json
index.ts
function2/
function.json
index.ts
host.json
package.json
tsconfig.json
package.json
tsconfig.json
it is currently configured with workspaces in the root’s package.json, and it builds fine if I run npm run build --workspace=web-api
, however when I cd
into web-api
and try to run func start
it throws a runtime error Worker was unable to load function function1: 'Cannot find module 'libraries/lib1/constants'
my nested tsconfig is set up to reference the libraries folder, and when web-api workspace is built, I see a dist
folder with both libraries and web-api subfolders, so it pulls in all of the relevant js and mapping files that tsc builds, but for some reason func start
is looking somewhere else. Is that additional plumbing that I need? Or am I executing it wrong?