Skip to content

Error when running Vitest #6209

Open
Open
@apoorvarajan

Description

@apoorvarajan

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"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug: ValidatedThis PR or Issue is verified to be a bug within StencilHelp Wanted

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions