ErKeLost / create-vite-app

🍰🍰 VIte-CLI resolve Vite create starter template No need to configure vite scaffolding templates quickly build vite4.x development templates highly customized Vue3.x React 18 Vite5.x

Home Page:https://vite-cli.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npx create-vite-template@latest 报错

klgd opened this issue · comments

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

commented

我试一下 应该是 prettier 解析的问题

commented

image
我这里是可以创建的 node 版本跟你一样 你还有什么其他的配置么 或者具体选了那些配置 是 windows 么

commented

image 我这里是可以创建的 node 版本跟你一样 你还有什么其他的配置么 或者具体选了那些配置 是 windows 么

嗯 windows 其他配置指的是哪些?

ps 我在ubuntu下试了 也是一样的错误

commented

你选了什么 就是这些项目的配置都选了什么, 我去找个windows 试一下

commented

image

ESLint Prettier 是no

不过全yes 全plugin 都试了 也是报错

commented

image

ESLint Prettier 是no

不过全yes 全plugin 都试了 也是报错

好滴 我找个 windows 试一下

commented

Tencent/wujie#625 跟这个应该是同一个问题

commented

Tencent/wujie#625 跟这个应该是同一个问题

嗯嗯 我感觉也是 等我改一下

commented

有什么临时的解决办法吗

commented

有什么临时的解决办法吗

重新试一下呢 v0.5.2

commented

有什么临时的解决办法吗

重新试一下呢 v0.5.2

你好,用的0.5.2,在node 14、16、18、20下都试了,报错
image
image

commented

image
你这里显示的是 5.0.2 么 奇怪我在看一下

commented

image 你这里显示的是 5.0.2 么 奇怪我在看一下

显示的是0.5.1 不过在执行npx create-vite-template@latest时 安装的是@v0.5.2
国内源应该是没有更新到0.5.2 我直接用的npmjs源

ps:方便的话 能按照这个选项帮忙生成一个项目吗 发给我先用着
image

commented

image 你这里显示的是 5.0.2 么 奇怪我在看一下

显示的是0.5.1 不过在执行npx create-vite-template@latest时 安装的是@v0.5.2 国内源应该是没有更新到0.5.2 我直接用的npmjs源

ps:方便的话 能按照这个选项帮忙生成一个项目吗 发给我先用着 image

https://github.com/ErKeLost/ant-design-vue-template 生成完了 你可以用这个 主题切换有点小问题 等我后续重新把依赖更新一下 加一下其他功能 你先用

commented

非常感谢!

This issue is stale because it has been open for 7 days with no activity.

This issue was closed because it has been inactive for 3 days since being marked as stale.