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: Cannot convert undefined or null to object #1087

Open
thure opened this issue May 1, 2024 · 0 comments
Open

Stencil: Cannot convert undefined or null to object #1087

thure opened this issue May 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@thure
Copy link

thure commented May 1, 2024

Describe the bug
When trying to run nx g @nxext/stencil:lib my-lib in a fresh Nx workspace, the target errors:

❯ ./node_modules/.bin/nx g @nxext/stencil:lib my-lib --verbose

 NX  Generating @nxext/stencil:library

✔ Which stylesheet format would you like to use? · css

 NX   Cannot convert undefined or null to object


TypeError: Cannot convert undefined or null to object
    at ~/Projects/nxext-stencil-project/node_modules/@nxext/stencil/src/generators/library/lib/update-tsconfig.js:8:35
    at updateJson (~/Projects/nxext-stencil-project/node_modules/nx/src/generators/utils/json.js:45:26)
    at updateTsConfig (~/Projects/nxext-stencil-project/node_modules/@nxext/stencil/src/generators/library/lib/update-tsconfig.js:6:29)
    at ~/Projects/nxext-stencil-project/node_modules/@nxext/stencil/src/generators/library/generator.js:54:46
    at Generator.next (<anonymous>)
    at fulfilled (~/Projects/nxext-stencil-project/node_modules/tslib/tslib.js:166:62)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

To Reproduce
Follow the directions provided in the package:

Add this plugin to an Nx workspace

Then continue to follow the directions provided in the package:

Generate your projects

This second step will fail as above.

Expected behavior
The tool generates the project without errors.

Additional context
It’s clear that “add this plugin to an Nx workspace” is not specific enough – is there an example Nx workspace available in which this command is demonstrated to work? Has this only been tested in certain engine versions?

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

1 participant