Error importing `api` on node application in turborepo
I keep getting this error when setting up on Fastify Server apps in a Turborepo. It appears when i attempt to import the
api
from the generated
https://github.com/ibrahimyaacob92/11-turbo-next-fastify-2/tree/devGitHub
GitHub - ibrahimyaacob92/11-turbo-next-fastify-2 at dev
Contribute to ibrahimyaacob92/11-turbo-next-fastify-2 development by creating an account on GitHub.


2 Replies
it's being compiled as "commonjs" instead of as a module. I would check the tsconfig against a working demo
hi @ian i built this on top of the turborepo demo, im not that great with tsconfig, but here it is on the fastify server app
{
"extends": "fastify-tsconfig",
"compilerOptions": {
"sourceMap": true,
"outDir": "./dist",
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noImplicitThis": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
//
},
"exclude": [
"node_modules"
],
"include": [
"./src/*/.ts"
]
}