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

yarn docs:dev success but yarn docs:build error! #1443

Closed
JiaZhiheng opened this issue Oct 7, 2022 · 4 comments
Closed

yarn docs:dev success but yarn docs:build error! #1443

JiaZhiheng opened this issue Oct 7, 2022 · 4 comments

Comments

@JiaZhiheng
Copy link

build error:
file:///Users/development/Documents/GitHub/Blog/docs/.vitepress/.temp/app.js:6
import { NCarousel } from "naive-ui";
^^^^^^^^^
SyntaxError: Named export 'NCarousel' not found. The requested module 'naive-ui' 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 'naive-ui';
const { NCarousel } = pkg;

@JiaZhiheng
Copy link
Author

引入naive-ui第三方组件库后,打包报错

@JiaZhiheng JiaZhiheng changed the title yarn docs:dev yes but yarn docs:build error! yarn docs:dev success but yarn docs:build error! Oct 7, 2022
@brc-dd
Copy link
Member

brc-dd commented Oct 7, 2022

Duplicate of #1399

@brc-dd brc-dd marked this as a duplicate of #1399 Oct 7, 2022
@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2022
@JiaZhiheng
Copy link
Author

thank you very much

@sky124380729
Copy link

thank you very much

请问解决了吗,我现在引入还是会报这个错

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants