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

请问可以把VisualDL中的netron单独拿出来集成到自己的vue3项目中吗? #1266

Open
wangyexiang opened this issue Apr 1, 2024 · 0 comments

Comments

@wangyexiang
Copy link

请问可以把VisualDL中的netron单独拿出来集成到自己的vue3项目中吗?我用https://www.npmjs.com/package/@visualdl/netron?activeTab=versions安装了netron后,在项目中使用时候,报如下错误:

21:33:52 [vite] Pre-transform error: Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .html file format, or if it's an asset, add "**/*.html" to `assetsInclude` in your configuration.
21:33:52 [vite] Internal server error: Failed to parse source for import analysis because the content contains invalid JS syntax. You may need to install appropriate plugins to handle the .html file format, or if it's an asset, add "**/*.html" to `assetsInclude` in your configuration.
  Plugin: vite:import-analysis
  File: F:/Downloads/test-netron/node_modules/.pnpm/@visualdl+netron@2.2.1/node_modules/@visualdl/netron/dist/index.html:1:598
  1  |  <!doctype html><html><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover"/><link href="./style.css" rel="stylesheet"></head><body><div id="graph" class="graph"><svg id="canvas" class="canvas" preserveaspectratio="xMidYMid meet" width="100%" height="100%"></svg></div><script src="./vendors.a675f21198a5533447d1.js"></script><script src="./index.87b6761e423700897d69.js"></script><script src="./shim.1afc356aaf25430abf46.js"></script><script src="./style.31d6cfe0d16ae931b73c.js"></script></body></html>
     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
      at formatError (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:50796:46)
      at TransformContext.error (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:50790:19) 
      at TransformContext.transform (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:65876:22)
      at async Object.transform (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:51105:30) 
      at async loadAndTransform (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:53858:29) 
      at async viteTransformMiddleware (file:///F:/Downloads/test-netron/node_modules/.pnpm/vite@5.2.7/node_modules/vite/dist/node/chunks/dep-C-KAszbv.js:63631:32)

请问一下,这个应该如何解决呢?多谢

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

1 participant