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

[Bug] Failed to parse composables/katex.js #4058

Closed
6 of 8 tasks
Sun-ZhenXing opened this issue Apr 11, 2024 · 0 comments
Closed
6 of 8 tasks

[Bug] Failed to parse composables/katex.js #4058

Sun-ZhenXing opened this issue Apr 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Sun-ZhenXing
Copy link

Checklist

  • I am using LTS version of Node.js.
  • I am using the latest v2 version of VuePress and VuePress official plugins.
  • I am using the latest v2 version of vuepress-theme-hope and all plugins in this repo.
  • I followed the docs and I double checked my configuration.
  • I have searched FAQ and I did not find the answer.

Package name

vuepress-plugin-md-enhance

Which operating system are you using?

  • macOS
  • Windows
  • Linux

Describe the bug

It appears that the name of the file has been changed. Cannot import useKatexCopy .

if (isPlainObject(options.katex) && options.katex.copy) {
imports.add(
`import { useKatexCopy } from "${CLIENT_FOLDER}composables/katex.js";`,
);
setups.add(`useKatexCopy();`);
}

15:43:20 [vite] Pre-transform error: Failed to resolve import "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client/composables/katex.js" from "docs/.vuepress/.temp/md-enhance/config.js". Does the file exist?
15:43:21 [vite] Internal server error: Failed to resolve import "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client/composables/katex.js" from "docs/.vuepress/.temp/md-enhance/config.js". Does the file exist?
  Plugin: vite:import-analysis
  File: D:/workspace/VuePress/vuepress-solid-template/docs/.vuepress/.temp/md-enhance/config.js:9:31
  7  |  import "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/katex@0.16.10/node_modules/katex/dist/katex.min.css";
  8  |  import "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client/styles/katex.scss";
  9  |  import { useKatexCopy } from "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client/composables/katex.js";
     |                                ^
  10 |  import Mermaid from "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client/components/Mermaid.js";
  11 |  import { injectMermaidConfig } from "D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vuepress-plugin-md-enhance@2.0.0-rc.35_katex@0.16.10_markdown-it@14.1.0_mermaid@10.9.0_typesc_ji4ahd6houioimezwo6cnvzy3u/node_modules/vuepress-plugin-md-enhance/lib/client//index.js";
      at formatError (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:50863:46)  
      at TransformContext.error (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNL      at TransformContext.error (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:50857:19)
      at normalizeUrl (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66092:33)
      at async file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66247:47    
      at async Promise.all (index 8)
      at async TransformContext.transform (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:66168:13)
      at async Object.transform (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:51172:30)
      at async loadAndTransform (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:53923:29)
      at async viteTransformMiddleware (file:///D:/workspace/VuePress/vuepress-solid-template/node_modules/.pnpm/vite@5.2.8_@types+node@20.12.7/node_modules/vite/dist/node/chunks/dep-whKeNLxG.js:63775:32)

Additional context

No response

@Sun-ZhenXing Sun-ZhenXing added the bug Something isn't working label Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants