vue-mini / create-vue-mini

🛠️ 创建 Vue Mini 小程序项目的最佳方案。
MIT License
39 stars 13 forks source link

npm create vue-mini@latest 报错 #3

Closed xb001130 closed 3 months ago

xb001130 commented 3 months ago

微信截图_20240627095246

xb001130 commented 3 months ago

使用nvm控制node版本,nvm安装在D盘,创建项目也在D盘

yangmingshan commented 3 months ago

看起来是个比较容易修的问题。但是我手上没有 Windows 电脑。能麻烦你帮忙 debug 一下吗?

把这个仓库下载下来,然后 pnpm i && pnpm build,再 node outfile.js。使用 node v22.3.0 和 pnpm v9.4.0。

另外你试试跑 npm create vue@latest 会有问题吗?

xb001130 commented 3 months ago

create-vue-mini 使用import { fileURLToPath } from 'url'处理路径是可以成功创建项目的,不知道这么处理对不对

xb001130 commented 3 months ago

npm create vue@latest这个命令是没有问题的

yangmingshan commented 3 months ago

使用import { fileURLToPath } from 'url'处理路径是可以成功创建项目的,不知道这么处理对不对

@xb001130 谢谢,应该就是这个问题。你可以试一下 npm create vue-mini@0.0.11 看是不是好了。

yangmingshan commented 3 months ago

closed via https://github.com/vue-mini/create-vue-mini/commit/bff58408b52adaf8244c6bc1e5e6ddc424bb0c37