Skip to content

Error when running Vitest #6209

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

Open
apoorvarajan opened this issue Mar 18, 2025 · 0 comments
Open

Error when running Vitest #6209

apoorvarajan opened this issue Mar 18, 2025 · 0 comments
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted

Comments

@apoorvarajan
Copy link

apoorvarajan commented Mar 18, 2025

Getting the error:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './compiler/stencil.js' is not defined by "exports" in /node_modules/@stencil/core/package.json

when running vitest --run .

Followed doc: https://stenciljs.com/docs/next/testing/vitest

vitest.config.js

import stencil from 'unplugin-stencil/vite'
import { defineConfig } from 'vitest/config'

export default defineConfig({
    test: {
        browser: {
            enabled: true,
            headless: true,
            name: 'chrome'
        },
    },
    plugins: [stencil({})]
})

versions:

"dependencies": {
    "@stencil/core": "^4.28.0",
    "@vitest/browser": "^3.0.8",
    "unplugin-stencil": "^0.1.1",
    "vitest": "^3.0.8",
    "webdriverio": "^9.12.0"
  }
@christian-bromann christian-bromann added Bug: Validated This PR or Issue is verified to be a bug within Stencil Help Wanted labels Mar 19, 2025
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 Help Wanted
Projects
None yet
Development

No branches or pull requests

2 participants