npx create-vite-template@latest 报错
klgd opened this issue · 17 comments
klgd commented
Steps to reproduce
npx create-vite-template@latest
What is expected?
创建成功
What is actually happening?
🍰 Welcome Use Vite To Create Template! v0.3.6
√ Project Name ? ... project-name
√ Choose your framework » Vue
√ Which package manager do you want to use ? » Pnpm
√ Add Vue Router for Single Page Application development? ... No / Yes
√ Add Pinia for state management? ... No / Yes
√ Add ESLint for code quality? ... No / Yes
√ Add Prettier for code formatting? ... No / Yes
√ choose UI frameWork » Ant Design Vue
√ Add theming && layout to your project? This item overrides some of the default configuration ... No / Yes
√ Custorm Your Plugins » @vitejs/plugin-vue-jsx, unplugin-vue-components, unplugin-auto-import, unplugin-icons, Unocss
▶ copy templatenode:internal/errors:478
ErrorCaptureStackTrace(err);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received an instance of Promise
at writeFile (node:fs:2155:5)
at R (C:\Users\Administrator\AppData\Local\npm-cache\_npx\28263570ba0ab32c\node_modules\create-vite-template\outfile.cjs:23:1145)
at Object.n [as writeFile] (C:\Users\Administrator\AppData\Local\npm-cache\_npx\28263570ba0ab32c\node_modules\create-vite-template\outfile.cjs:23:1104)
at C:\Users\Administrator\AppData\Local\npm-cache\_npx\28263570ba0ab32c\node_modules\create-vite-template\outfile.cjs:28:1551
at C:\Users\Administrator\AppData\Local\npm-cache\_npx\28263570ba0ab32c\node_modules\create-vite-template\outfile.cjs:22:1381 {
code: 'ERR_INVALID_ARG_TYPE'
}
NativeCommandExitException: Program "npx.cmd" ended with non-zero exit code: 1.
System Info
node v16.20.0
Any additional comments?
No response
ErKeLost commented
我试一下 应该是 prettier 解析的问题
ErKeLost commented
klgd commented
ErKeLost commented
你选了什么 就是这些项目的配置都选了什么, 我去找个windows 试一下
klgd commented
ErKeLost commented
klgd commented
Tencent/wujie#625 跟这个应该是同一个问题
ErKeLost commented
Tencent/wujie#625 跟这个应该是同一个问题
嗯嗯 我感觉也是 等我改一下
klgd commented
有什么临时的解决办法吗
ErKeLost commented
有什么临时的解决办法吗
重新试一下呢 v0.5.2
klgd commented
ErKeLost commented
klgd commented
ErKeLost commented
显示的是0.5.1 不过在执行
npx create-vite-template@latest
时 安装的是@v0.5.2 国内源应该是没有更新到0.5.2 我直接用的npmjs源
https://github.com/ErKeLost/ant-design-vue-template 生成完了 你可以用这个 主题切换有点小问题 等我后续重新把依赖更新一下 加一下其他功能 你先用
klgd commented
非常感谢!
github-actions commented
This issue is stale because it has been open for 7 days with no activity.
github-actions commented
This issue was closed because it has been inactive for 3 days since being marked as stale.