erver relative imports are not implemented yet. Please try an import relative to the file you are in
Unanswered
satvik posted this in #help-forum
satvikOP
What's the status for this? My monorepo doesn't use a repo manager like nx or turborepo, so I'm thinking the only option is to resolve it thru server paths. Lemme know what's the status of this ticket
9 Replies
@satvik What's the status for this? My monorepo doesn't use a repo manager like nx or turborepo, so I'm thinking the only option is to resolve it thru server paths. Lemme know what's the status of this ticket
just set up absolute path import in
tsconfig.json
and import foo from "@/public/foo.png"
instead of import foo from "/public/foo.png"
https://github.com/vercel/turborepo/issues/4979#issuecomment-1551898170satvikOP
I have that already, still doesn't work
@satvik I have that already, still doesn't work
i'll need a reproduction repository then to know what exactly is the problem you are facing
satvikOP
sure sure, will send one out soon!
satvikOP
https://github.com/satvik-1203/turbopack-path-issues
go into next-app.
works without turbopack but fails when using it. I have my path alias in tsconfig
go into next-app.
npm run dev
for running it without turbo (port 3000)npm run dev:turbo
for running it with turbo (port 3001)works without turbopack but fails when using it. I have my path alias in tsconfig
Hope that helps debug something!
@satvik https://github.com/satvik-1203/turbopack-path-issues
go into next-app.
`npm run dev` for running it without turbo (port 3000)
`npm run dev:turbo` for running it with turbo (port 3001)
works without turbopack but fails when using it. I have my path alias in tsconfig
uh no... this is not how a monorepo should be implemented. at least you need to use npm workspaces since you are using npm.
if you want to use a dependency, you need to declare that dependency in package.json.
if you want to use a dependency, you need to declare that dependency in package.json.
satvikOP
Yessir ik, we wer too late and the codebase is kinda mature now. We really need turbopack working 😂
It’s alr tho, I made buncha config changes to make turborepo work without alot of changes or conflicts