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

请问下在Vue3里面怎么使用这个组件呢?先pnpm安装、后import使用,然后启动会报错找不到文件,方便指导下吗?谢谢! #46

Open
Erica666 opened this issue Nov 29, 2022 · 1 comment

Comments

@Erica666
Copy link

在main.ts 中import
import VuePipeline from 'vue-pipeline';

async function bootstrap() {
const app = createApp(App);
app.use(VuePipeline);
app.mount('#app');
}

报错信息:
ERROR Failed to resolve import "./PipelineNode" from "node_modules.pnpm\[email protected]\node_modules\vue-pipeline\src\components\Pipeline.vue". Does the file exist?

ERROR 11:12:36 [vite] Internal server error: Failed to resolve import "./PipelineNode" from "node_modules.pnpm\[email protected]\node_modules\vue-pipeline\src\components\Pipeline.vue". Does the file exist?
Plugin: vite:import-analysis
File: C:/GitProject/moray-web/node_modules/.pnpm/[email protected]/node_modules/vue-pipeline/src/components/Pipeline.vue
1 |
2 | import PipelineNode from "./PipelineNode";
| ^
3 | import PipelineLine from "./PipelineLine";
4 | import { Pipeline } from "./service";
at formatError (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:39080:46)
at TransformContext.error (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:39076:19)
at normalizeUrl (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:58360:26)
at async TransformContext.transform (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:58509:57)
at async Object.transform (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:39317:30)
at async doTransform (C:\GitProject\moray-web\node_modules.pnpm\[email protected][email protected]\node_modules\vite\dist\node\chunks\dep-689425f3.js:50043:29)

@Erica666 Erica666 changed the title 请问下在Vue3里面怎么使用这个组件呢?我引入组件报错,不清楚哪步写错了,可指导下吗?谢谢! 请问下在Vue3里面怎么使用这个组件呢?先pnpm安装、后import使用,然后启动会报错找不到文件,方便指导下吗?谢谢! Nov 29, 2022
@kenail2002
Copy link

kenail2002 commented Dec 7, 2022

import PipelineNode from "./PipelineNode.vue";

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

2 participants