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

在nuxt中构建包后有vueuc导入方式问题报错,导致页面访问500 #6682

Open
5 tasks done
PrettyPuppyCavalier opened this issue Jan 4, 2025 · 0 comments
Open
5 tasks done
Labels
untriaged need to sort

Comments

@PrettyPuppyCavalier
Copy link

描述错误

[nuxt] [request error] [unhandled] [500] Named export 'VBinder' not found. The requested module 'vueuc' 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 'vueuc';
const { resizeObserverManager, VResizeObserver, VirtualList, VFollower, VBinder, VTarget, VOverflow, VFocusTrap } = pkg;

复现步骤

  1. 构建nuxt应用
  2. 安装npm install naive-ui
  3. 打包npm run build
  4. 预览npm run preview

最小复现链接

none

系统信息

node版本 v20.11.1
nuxt版本 3.15.0
navie UI版本 2.40.4

使用的包管理器

npm

验证

@PrettyPuppyCavalier PrettyPuppyCavalier added the untriaged need to sort label Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged need to sort
Projects
None yet
Development

No branches or pull requests

1 participant