vue-devui icon indicating copy to clipboard operation
vue-devui copied to clipboard

🐛 [Bug]: Named export 'AutoComplete' not found. The requested module 'vue-devui' is a CommonJS module, which may not support all module.exports as named exports.

Open KevinZhang19870314 opened this issue 3 years ago • 0 comments

Version

1.3.2

Vue Version

3.2.41

Link to minimal reproduction

It's not easy to write minimal repro examples, sorry!

Step to reproduce

  1. Fork https://github.com/KevinZhang19870314/v-formly-v3.git;
  2. Run npm i;
  3. Run docs:build:devui;
  4. Error raised to console.
PS D:\kevinzhang\study\formly\v-formly-v3> npm run docs:build:devui

> [email protected] docs:build:devui
> cross-env VFORMLY_LIB=devui vuepress build docs

✔ Initializing and preparing data - done in 11.27s
⠼ Compiling with vitewarnings when minifying css:
▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:12519:
      1 │ ...var(--devui-brand, #5e7ce0)}@charset "UTF-8";.devui-auto-complet...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:46865:
      1 │ ...--devui-border-radius, 2px)}@charset "UTF-8";.devui-collapse{fon...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:147630:
      1 │ ...o{transform:translate(100%)}@charset "UTF-8";.devui-tag{display:...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:156404:
      1 │ ...--devui-aide-text, #71757f)}@charset "UTF-8";.devui-pagination{d...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:170659:
      1 │ ...nsform:translate(-50%,-50%)}@charset "UTF-8";.devui-radio{font-s...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:231350:
      1 │ ...(--devui-success, #50d4ab)}}@charset "UTF-8";.devui-text-ellipsi...
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] "@charset" must be the first rule in the file [invalid-@charset]

    <stdin>:1:244668:
      1 │ ...nk, #526ecc);cursor:pointer}@charset "UTF-8";html{line-height:1....
        ╵                                ~~~~~~~~

  This rule cannot come before a "@charset" rule

    <stdin>:1:0:
      1 │ .devui-alert{color:var(--devui-text, #252b3a);font-size:var(--devui...
        ╵ ^


▲ [WARNING] Expected identifier but found "*" [css-syntax-error]

    <stdin>:1:249680:
      1 │ ...6px}.grid{letter-spacing:-.31em;*letter-spacing: normal;word-spa...
        ╵                                    ^


▲ [WARNING] Expected identifier but found "*" [css-syntax-error]

    <stdin>:1:249960:
      1 │ ...4,.u-23-24{display:inline-block;*display: inline;zoom:1;letter-s...
        ╵                                    ^


⠧ Compiling with vitewarnings when minifying css:
▲ [WARNING] Expected identifier but found "*" [css-syntax-error]

    <stdin>:31277:564663:
      31277 │ ...x}.grid{letter-spacing:-.31em;*letter-spacing: normal;word-s...
            ╵                                  ^


▲ [WARNING] Expected identifier but found "*" [css-syntax-error]

    <stdin>:31277:564943:
      31277 │ ....u-23-24{display:inline-block;*display: inline;zoom:1;letter...
            ╵                                  ^


⠏ Compiling with vite
(!) Some chunks are larger than 500 KiB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/guide/en/#outputmanualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✔ Compiling with vite - done in 135.84s
✖ Rendering 55 pages - failed in 5.23s
file:///D:/kevinzhang/study/formly/v-formly-v3/docs/.vuepress/.temp/.server/app.84740974.mjs:19
import DevUI, { Input as Input$1, Switch as Switch$1, AutoComplete as AutoComplete$1, CheckboxGroup as CheckboxGroup$1, DRangeDatePickerPro, DatePickerPro, TimePicker as TimePicker$1, InputNumber as InputNumber$1, Textarea as Textarea$1, Slider as Slider$1, Rate as Rate$1, RadioGroup as RadioGroup$1, Select as Select$1 } from "vue-devui";
                                                      ^^^^^^^^^^^^
SyntaxError: Named export 'AutoComplete' not found. The requested module 'vue-devui' 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 'vue-devui';
const { Input: Input$1, Switch: Switch$1, AutoComplete: AutoComplete$1, CheckboxGroup: CheckboxGroup$1, DRangeDatePickerPro, DatePickerPro, TimePicker: TimePickertePickerPro, TimePicker: TimePicker$1, InputNumber: InputNumber$1, Textarea: Textarea$1, Slider: Slider$1, Rate: Rate$1, RadioG1 } = pkg;roup: RadioGroup$1, Select: Select$1 } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:179:5)
    at async Loader.import (node:internal/modules/esm/loader:178:24)
    at async file:///D:/kevinzhang/study/formly/v-formly-v3/node_modules/@vuepress/bundler-vite/dist/index.js:420:30
    at async file:///D:/kevinzhang/study/formly/v-formly-v3/node_modules/@vuepress/utils/dist/index.js:98:20
    at async build (file:///D:/kevinzhang/study/formly/v-formly-v3/node_modules/@vuepress/bundler-vite/dist/index.js:408:3)    
    at async CAC.<anonymous> (file:///D:/kevinzhang/study/formly/v-formly-v3/node_modules/@vuepress/cli/dist/index.js:228:3)

What is expected

No errors, build success.

What is actually happening

Error raised to console

Any additional comments (optional)

No response

KevinZhang19870314 avatar Dec 09 '22 10:12 KevinZhang19870314