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

build error when import ant-design-vue #355

Open
5 tasks done
bobby169 opened this issue Jun 24, 2023 · 3 comments
Open
5 tasks done

build error when import ant-design-vue #355

bobby169 opened this issue Jun 24, 2023 · 3 comments

Comments

@bobby169
Copy link

Describe the bug

I use the vitesse template to test vite-ssg.

add ant-design-vue and run scripts npm run dev no error, but error when run npm run build .

import { Button } from "ant-design-vue/es/index.js";
         ^^^^^^
SyntaxError: Named export 'Button' not found. The requested module 'ant-design-vue/es/index.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'ant-design-vue/es/index.js';

Reproduction

https://github.com/bobby169/vitesse

System Info

System:
    OS: macOS 12.6.2
    CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
    Memory: 124.25 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    npm: 9.5.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 114.0.5735.133
    Safari: 15.6.1

Used Package Manager

pnpm

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.
@Eacolt
Copy link

Eacolt commented Jun 29, 2023

I use NaiveUI and have the same problem as you, what can i do? so sad !

@transtone
Copy link

transtone commented Jul 2, 2023

same error.

nuxt build no problem. but nuxt can't use keepalive with include.

nuxt add <RouteProvider> as <Keepalive> 's children in each page, so can't use page name to diff them.

nuxt/nuxt#15214

@howiepu
Copy link

howiepu commented Oct 12, 2023

same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants