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

bug: Missing export of mock-doc in package.json #5860

Closed
3 tasks done
saschanowak opened this issue Jun 27, 2024 · 2 comments
Closed
3 tasks done

bug: Missing export of mock-doc in package.json #5860

saschanowak opened this issue Jun 27, 2024 · 2 comments
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@saschanowak
Copy link
Contributor

Prerequisites

Stencil Version

4.19.0

Current Behavior

Since the #5275 the exports in the package.json where changed.
We are using the parseHtmlToDocument from the mock-doc for our custom output target for an ssr server.
Now we are getting an rollup compile error:

(node-resolve plugin) Could not resolve import "@stencil/core/mock-doc" in /.stencil/nlx-hydrate-server/server.js using exports defined in /node_modules/@stencil/core/package.json.
(node-resolve plugin) Could not resolve import "@stencil/core/mock-doc" in undefined using exports defined in /node_modules/@stencil/core/package.json.
(node-resolve plugin) Could not resolve import "@stencil/core/mock-doc" in undefined using exports defined in /node_modules/@stencil/core/package.json.

Expected Behavior

Exporting the mock-doc in the package.json again.

System Info

System: node 20.14.0
    Platform: darwin (23.5.0)
   CPU Model: Apple M2 Pro (12 cpus)
    Compiler: node_modules/@stencil/core/compiler/stencil.js
       Build: 1719433468
     Stencil: 4.19.0 🏄
  TypeScript: 5.4.5
      Rollup: 2.56.3
      Parse5: 7.1.2
      jQuery: 4.0.0-pre
      Terser: 5.31.1

Steps to Reproduce

  • Clone the repository
  • Install node dependencies
  • Run build npm run build

{code}

[email protected] build
stencil build

[03:13.4] @stencil/core
[03:13.6] v4.19.0 🏄
[03:14.3] build, demo, prod mode, started ...
[03:14.3] transpile started ...
[03:15.5] transpile finished in 1.21 s
[03:15.5] copy started ...
[03:15.5] generate custom elements + source maps started ...
[03:15.5] generate hydrate app started ...
[03:15.5] generate lazy + source maps started ...
[03:15.5] copy finished (0 files) in 35 ms
[03:15.8] generate custom elements + source maps finished in 274 ms
[03:15.9] generate hydrate app finished in 425 ms
[03:15.9] generate lazy + source maps finished in 426 ms
[03:15.9] generating nlx-hydrate-server started ...
[plugin node-resolve] Could not resolve import "@stencil/core/mock-doc" in .stencil/nlx-hydrate-server/server.js using exports defined in node_modules/@stencil/core/package.json.
[plugin node-resolve] Could not resolve import "@stencil/core/mock-doc" in undefined using exports defined in node_modules/@stencil/core/package.json.
[plugin node-resolve] Could not resolve import "@stencil/core/mock-doc" in undefined using exports defined in node_modules/@stencil/core/package.json.
"@stencil/core/mock-doc" is imported by "@stencil/core/mock-doc?commonjs-external", but could not be resolved – treating it as an external dependency.
[03:16.3] generate nlx-hydrate-server finished in 323 ms
[03:16.3] build finished in 2.00 s
{code}

The file dist/ssr-server/index.js is not present.

Code Reproduction URL

https://github.com/saschanowak/stencil-hydrate-server-demo

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jun 27, 2024
@saschanowak saschanowak changed the title bug: bug: Missing export of mock-doc in package.json Jun 27, 2024
@christian-bromann christian-bromann self-assigned this Jun 27, 2024
@christian-bromann christian-bromann added the Bug: Validated This PR or Issue is verified to be a bug within Stencil label Jun 27, 2024
@ionitron-bot ionitron-bot bot removed the triage label Jun 27, 2024
@Tallyb
Copy link
Contributor

Tallyb commented Jun 27, 2024

Also @stencil/core/testing or @stencil/core/testing/@stencil/core/testing/jest-preprocessor are no longer exported.

quite likely as a result of this: a2fa93b

@christian-bromann
Copy link
Member

Thanks for providing a PR for this. We've merged it and will make another release today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

No branches or pull requests

3 participants