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

SyntaxError: The requested module '@highlightjs/vue-plugin' does not provide an export named 'default' #52

Open
GuYun-D opened this issue Nov 28, 2024 · 2 comments

Comments

@GuYun-D
Copy link

GuYun-D commented Nov 28, 2024

I am using Vitepress+@ highlightjs/vue plugin to build my documentation webpage, and there were no issues during development. However, when I was packaging it, it prompted me with 'SyntaxError: The requested module' @ highlightjs/vue plugin 'does not provide an export named' default '

@addshore
Copy link

I also see this.

Using vitepress dev is totally fine.

If I try vitepress build however...

  vitepress v1.5.0

⠙ building client + server bundles...
(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ building client + server bundles...
build error:
The requested module '@highlightjs/vue-plugin' does not provide an export named 'default'
file:///home/adam/dev/lb/io/docs/.vitepress/.temp/app.js:13
import hljsVuePlugin from "@highlightjs/vue-plugin";
       ^^^^^^^^^^^^^
SyntaxError: The requested module '@highlightjs/vue-plugin' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:323:24)
    at async build (file:///home/adam/dev/lb/io/docs/node_modules/vitepress/dist/node/chunk-DMuPggCS.js:49296:24)

@slow-groovin
Copy link

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

3 participants