Open
Description
Prerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Stencil Version
4.27.2
Stencil Framework Output Target
Vue
Stencil Framework Output Target Version
0.9.6
Current Behavior
The Nuxt (3.16.0) application build failed with this error:
[ nuxi 2:34:51 PM] ERROR Nuxt Build Error: ../../packages/core/hydrate/index.mjs (2:0): "Readable" is not exported by "__vite-browser-external", imported by "../../packages/core/hydrate/index.mjs".
file: ../../packages/core/hydrate/index.mjs:2:0
1: import { Readable } from 'stream';
2:
^
3: const modeResolutionChain = [];
Expected Behavior
Build success.
Steps to Reproduce
I fork the designsystem-boilerplate
repo to reproduce the bug:
- Clone the below "Code reproduction URL"
- In the root of the project:
npm i -ws
npm run build:nuxt
Code Reproduction URL
https://github.com/mamillastre/stencil-code-reproduction
Additional Information
In the vue package, Stencil will generate the component.ts
file that lazy load the @placeid/code/hydrate
that uses the stream
dependency.
But this dependency has to be used in a node context and I thick we have this error because Nuxt try to compile in a browser context.