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]: 引入第三方插件elementplus报错,按照文档在bundle.json中配置了element-plus的相关组件,但是在渲染的时候报错“Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../" #179

Closed
traveler-h opened this issue Dec 22, 2023 · 10 comments · Fixed by #188
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@traveler-h
Copy link

Environment

window11

Version

node20

Version

lasted

Link to minimal reproduction

{
"id": 2,
"version": "2.4.4",
"name": {
"zh_CN": "按钮"
},
"component": "ElButton",
"icon": "button",
"description": "常用的操作按钮",
"doc_url": "",
"screenshot": "",
"tags": "",
"keywords": "",
"dev_mode": "proCode",
"npm": {
"package": "element-plus",
"version": "2.4.4",
"script": "https://unpkg.com/[email protected]/dist/index.full.mjs",
"css": "https://unpkg.com/[email protected]/dist/index.css",
"dependencies": null,
"exportName": "ElButton"
},
"group": "基础组件",
"category": "element-plus",
"configure": {
"loop": true,
"condition": true,
"styles": true,
"isContainer": false,
"isModal": false,
"isPopper": false,
"nestingRule": {
"childWhitelist": "",
"parentWhitelist": "",
"descendantBlacklist": "",
"ancestorWhitelist": ""
},
"isNullNode": false,
"isLayout": false,
"rootSelector": "",
"shortcuts": {
"properties": ["type", "size"]
},
"contextMenu": {
"actions": ["copy", "remove", "insert", "updateAttr", "bindEevent", "createBlock"],
"disable": []
},
"invalidity": [""],
"clickCapture": true,
"framework": "Vue"
},
"schema": {
"properties": [
{
"name": "0",
"label": {
"zh_CN": "基础属性"
},
"content": [
{
"property": "size",
"label": {
"text": {
"zh_CN": "size"
}
},
"description": {
"zh_CN": "尺寸"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"defaultValue": "default",
"widget": {
"component": "MetaSelect",
"props": {
"options": [
{
"label": "large",
"value": "large"
},
{
"label": "default",
"value": "default"
},
{
"label": "small",
"value": "small"
}
]
}
}
},
{
"property": "type",
"label": {
"text": {
"zh_CN": "type"
}
},
"description": {
"zh_CN": "类型"
},
"required": true,
"readOnly": false,
"disabled": false,
"cols": 12,
"labelPosition": "top",
"type": "string",
"widget": {
"component": "MetaInput",
"props": {}
}
}
],
"description": {
"zh_CN": ""
}
}
],
"events": {},
"slots": {
"default": {
"label": {
"zh_CN": "default"
},
"description": {
"zh_CN": "自定义默认内容"
}
},
"loading": {
"label": {
"zh_CN": "loading"
},
"description": {
"zh_CN": "自定义加载中组件"
}
}
}
}
},

Step to reproduce

npm run dev
控制台报错:Uncaught (in promise) TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".

What is expected

No response

What is actually happening

No response

Any additional comments (optional)

No response

@chilingling chilingling added the Need to reproduce We need more details to reproduce your issue. label Dec 22, 2023
@chilingling
Copy link
Member

@traveler-h 无法复现,请提供更详细的复现步骤与细节

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


@traveler-h Unable to reproduce, please provide more detailed reproduction steps and details

@traveler-h
Copy link
Author

default.mp4

@traveler-h
Copy link
Author

视频是在拉取了develop最新代码之后的操作 未做任何的修改 @chilingling

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The video is the operation after pulling the latest code of develop without any modification @chilingling

@chilingling
Copy link
Member

视频是在拉取了develop最新代码之后的操作 未做任何的修改 @chilingling

  1. 方便提供一下终端的截图吗?有没有报错?启动命令在哪个目录执行的?
  2. 可以试试使用 pnpm,看看会不会有报错,我们这边使用的是 pnpm 来管理依赖的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The video is the operation after pulling the latest code of develop without any modification @chilingling

  1. Can you provide a screenshot of the terminal? Is there any error reported? In which directory is the startup command executed?
  2. You can try using pnpm to see if there will be any errors. We use pnpm here to manage dependencies.

@traveler-h
Copy link
Author

是使用pnpm安装依赖的
启动命令在tiny-engine下执行的
截图如下:
1703233125943
1703233145013
1703233171646
@chilingling

@chilingling
Copy link
Member

复现了,感谢反馈 @traveler-h

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Reproduced, thanks for the feedback @traveler-h

@chilingling chilingling added bug Something isn't working good first issue Good for newcomers and removed Need to reproduce We need more details to reproduce your issue. labels Dec 22, 2023
This was linked to pull requests Dec 23, 2023
@ghost ghost mentioned this issue Dec 26, 2023
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants