question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build/serve Stencil library

See original GitHub issue

Repro:

  1. Create a new Nx workspace
  2. Install @nxext/stencil
  3. Run nx g @nxext/stencil:lib my-lib
  4. Run nx build my-lib or nx serve my-lib

Expected:

Stencil library should build out to the dist directory

Actual:

TypeError: Cannot read property 'root' of undefined
    at MapSubscriber.project (<project-dir>\node_modules\@nxext\stencil\src\builders\utils\stencil-runtime.js:165:98)
    at MapSubscriber._next (<project-dir>\node_modules\rxjs\internal\operators\map.js:49:35)
    at MapSubscriber.Subscriber.next (<project-dir>\node_modules\rxjs\internal\Subscriber.js:66:18)
    at TapSubscriber._next (<project-dir>\node_modules\rxjs\internal\operators\tap.js:65:26)
    at TapSubscriber.Subscriber.next (<project-dir>\node_modules\rxjs\internal\Subscriber.js:66:18)
    at TapSubscriber._next (<project-dir>\node_modules\rxjs\internal\operators\tap.js:65:26)
    at TapSubscriber.Subscriber.next (<project-dir>\node_modules\rxjs\internal\Subscriber.js:66:18)
    at <project-dir>\node_modules\rxjs\internal\util\subscribeToPromise.js:7:24

Job Output failed to validate. Errors:
    Data path ".error" should be string.

Notes:

Typically you would need to add the --buildable and/or --publishable flag to the generate command for an Nx library, but this extension doesn’t support those flags.

I’m trying to migrate a UI library over from Angular to Stencil, so I followed the instructions here to add the Stencil extension and generate a Storybook config for it. Unfortunately, Storybook won’t run because it can’t resolve dist/libs/my-lib/loader. Figured I just needed to build the library first, but no dice. Then I figured something about my current Nx workspace configuration might be borked or incompatible with this extension in some way, so I generated a new workspace with the “empty” preset, but was able to reproduce the same issue by following the steps above.

Let me know if you need any more information. I might fork this repo tonight to see if I can figure out what’s going on and submit a PR.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DominikPiepercommented, Nov 3, 2020

I tried to reproduce, bus except the error I had cause of local changes I wasn’t able to reproduce in the playground on windows. Are you able to push a repo which doesn’t work on yours to github?

1reaction
DominikPiepercommented, Nov 3, 2020

Hey @dannymcgee The --buildable behavior will change in the future, the main branch already needs a --buildable for the serve yet. I’ll take a deeper look as well and the path’s problem is a known problem for me, hard to fix as a not windows user. I started to add more e2e tests for that. The library part needs some more stuff I’m already working on, but the bug strange. I’m able to reproduce it, but the strange thing is I’m able to reproduce it with serve and build runs through 😕

Read more comments on GitHub >

github_iconTop Results From Across the Web

Over 5000 stenciling designs available - FAQ.
Stencils from The Stencil Library - Over 5000 stenciling designs available - FAQ.
Read more >
Stencil Library terms and conditions
Stencils from The Stencil Library - Over 5000 stenciling designs available ... If we are unable to offer an appropriate substitute, we will...
Read more >
Stencil Library: Stencils | Wall stencils
Stencils from our range of over 5000 decorative wall stencil designs. Authentic historical STENCIL design side by side with contemporary imagery and many ......
Read more >
Over 5000 stenciling designs available - contact information.
How to contact us. The Stencil Library, Stocksfield Hall, Stocksfield, Northumberland, NE43 7TN, United Kingdom. Email ...
Read more >
Stencils from the world's largest collection of stencil designs
The huge Stencil Library collection of stencils is sub-divided into the stencil ranges shown below. Most subjects, like Art Nouveau stencils and Celtic ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found