dcloudio / uni-app

A cross-platform framework using Vue.js
https://uniapp.dcloud.io
Apache License 2.0
40k stars 3.63k forks source link

Uncaught TypeError: Failed to resolve module specifier "vue" #3659

Open Sumuyzzz opened 2 years ago

Sumuyzzz commented 2 years ago

问题描述 [问题描述:尽可能简洁清晰地把问题描述清楚]

页面无法打开

复现步骤 [复现问题的步骤]

使用vscode,按照官网命令

npx degit dcloudio/uni-preset-vue#vite my-vue3-project

cd my-vue3-project

yarn 

yarn serve

然后打开

http://localhost:3000  

image

预期结果 [使用简洁清晰的语言描述你希望生效的预期结果] 页面显示Hello 实际结果 [这里请贴上你的报错截图或文字] localhost/:1 Uncaught TypeError: Failed to resolve module specifier "vue". Relative references must start with either "/", "./", or "../".

系统信息:

补充信息 [可选] [根据你的分析,出现这个问题的原因可能在哪里?]

fxy060608 commented 2 years ago

node版本多少?如果太高或太低,可以调整到16,再试试