Closed iakovosvo closed 2 years ago
adding @dominikg as you made tsconfk and might know the reason
It looks like that package extends a tsconfig that is outside of it's own directory.
"extends":"../../tsconfig.json" in /Users/me/my-app/node_modules/@my-library/my-package/tsconfig.json
would be
/Users/me/my-app/node_modules/tsconfig.json
Does that file exist? I guess not. Also i'm not sure why there is typescript in node_modules. shouldn't that be a built version of my-package? This might have something to do with lerna (not familiar with it) but without a reproduction, i'm not sure what could be going on here.
Hello @iakovosvo. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with need reproduction
will be closed if they have no activity within 3 days.
I have exactly the same issue with this package : @axa-fr/react-oidc-redux You could add it and you will see that yarn build faild with the same error message.
I use react-ts template with yarn 3 with pnp mode.
I have exactly the same issue with this package : @axa-fr/react-oidc-redux You could add it and you will see that yarn build faild with the same error message.
see https://github.com/AxaGuilDEv/react-oidc/issues/671
it seems in that case the issue is that their package.json contains a legacy "jsnext:main" entry that takes precedence in vite. @iakovosvo you may want to check your project for a similar field
I use react-ts template with yarn 3 with pnp mode.
esm support with yarn pnp has been less than pleasant (read: not working) in the past. does it work now?
Thank's for your answer. Yarn dev works perfectly. I have only this issue with yarn build.
Describe the bug
I am trying to build a new React (Typescript) app but I get this error:
[vite:esbuild] failed to resolve "extends":"../../tsconfig.json" in /Users/me/my-app/node_modules/@my-library/my-package/tsconfig.json
This comes from my organization's monorepo. Is there any way to solve this? I can see from the documentation that using extends can affect the build.
Reproduction
Unfortunately I cannot post any code since this is a private repo but the build fails on my package that get's imported from my organisation's monorepo (lerna, workspaces).
System Info
Used Package Manager
yarn
Logs
Validations