Skip to content

No known conditions for "./lib" specifier in "element-plus" package #700

@pmatisko

Description

@pmatisko

Describe the bug

Hello,

I get this error: " No known conditions for "./lib" specifier in "element-plus" package" for all versions of Element plus after 2.3.7. My configuration is very simple. Only very basic minimalistic setup, one component. Thank you for any help.

Packages versions:

  "unplugin-auto-import": "^0.16.6", 
  "unplugin-element-plus": "^0.8.0",
  "unplugin-vue-components": "^0.25.2",
  "vite": "4.4.9",

Vite config plugins:

const plugins = [
nodeResolve(),
viteSSR(),
vue(),
AutoImport({
    resolvers: [ElementPlusResolver({ ssr: true })],
}),
  Components({
      resolvers: [
          ElementPlusResolver({ ssr: true }),
      ],
  }),
]

App.vue without Element plus import

<template>
    <div>
        <el-button type="primary">Button</el-button>
    </div>
</template>

This commit of Element Plus changed the exports in package.json. If the Element Plus version is correct, then auto import has to be updated. (https://github.com/element-plus/element-plus/pull/13498/files)

Reproduction

System Info

Windows 10
npm v9.6.6
node v18.16.0

Used Package Manager

npm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions