Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stencil: Always get 'Cannot find tsconfig.base.json' #1083

Closed
oliveirarafa opened this issue Apr 17, 2024 · 2 comments
Closed

Stencil: Always get 'Cannot find tsconfig.base.json' #1083

oliveirarafa opened this issue Apr 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@oliveirarafa
Copy link

oliveirarafa commented Apr 17, 2024

I don't know what I'm doing wrong but after creating a nx workspace I install @nxext/stencil and try to run nx g @nxext/stencil:lib core-components --buildable I get an error Cannot find tsconfig.base.json. Do i have to create it manually? What I put in it?

I use the following dependencies:

"@nx/js": "18.0.0",
"@nxext/stencil": "^18.0.0",
"nx": "18.0.0"
@oliveirarafa oliveirarafa added the bug Something isn't working label Apr 17, 2024
@finikwashere
Copy link

While creating your organisation workspace using npx create-nx-workspace, you are given options to chose from. This error can occur due to recent developments in NX, while nxext can't keep up with all the possible multitude of options the NX Workspace now offers. One of the questions during the installation is:

? Integrated monorepo, or standalone project? … 
Integrated Monorepo:  Nx creates a monorepo that contains multiple projects.
Standalone:           Nx creates a single project and makes it fast.

The first option will create a folder structure, where the tsconfig is split into multiple files. One file for each project/lib you have and one parent file in the root of the org workspace folder, called tsconfig.base.json.
The second option will create a simple workspace with a minimum folder structure, which supports only one application and therefore it does not need to split/share the tsconfig.json into this project/parent config. It is still in root folder, but called tsconfig.json, not tsconfig.base.json.

The Stencil lib generator you are invoking was intended to be used in the integrated monorepo, where you have a /libs and /apps folders, but it didn't produce a graceful error, telling you you have a standalone project.

If you recreate your workspace as integrated monorepo, stencil lib generator will work properly.

@oliveirarafa
Copy link
Author

Understood. I will try doing this. Using the newer versions gives a error too because of breaking changes on v20.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants