运行 npx create-uni@latest --info 报错
$ npx create-uni@latest --info
⠋ 正在获取插件信息...✖ 操作已取消
RangeError: Invalid count value
at String.repeat ()
at Ys.setFinishMessage (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:304989)
at Ys.fail (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:305328)
at el (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:441152)
at async tl (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:442548)
at async /Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:444206
🚀 遇到问题? 快速反馈:https://github.com/uni-helper/create-uni/issues/new/choose
描述问题
类型“{}”的参数不能赋给类型“ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{ readonly onError?: _ButtonOnError | undefined; ... 30 more ...; readonly onAgreeprivacyauthorization?: _ButtonOnAgreeprivacyauthorization | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomPro...”的参数。 不能将类型“{}”分配给类型“ComponentPublicInstanceConstructor<{ $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{ readonly onError?: _ButtonOnError | undefined; ... 30 more ...; readonly onAgreeprivacyauthorization?: _ButtonOnAgreeprivacyauthorization | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomPro...”。 类型“{}”提供的内容与签名“new (...args: any[]): { $: ComponentInternalInstance; $data: {}; $props: Partial<{}> & Omit<{ readonly onError?: _ButtonOnError | undefined; ... 30 more ...; readonly onAgreeprivacyauthorization?: _ButtonOnAgreeprivacyauthorization | undefined; } & VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<...>, never>; ... 10 more ...; $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: WatchOptions<...> | undefined): WatchStopHandle; } & ... 5 more ... & {}”不匹配。ts-plugin(2345)
div不影响,但是button、input也有问题
复现
仅创建与启动项目
系统信息
运行 npx create-uni@latest --info 报错 $ npx create-uni@latest --info ⠋ 正在获取插件信息...✖ 操作已取消 RangeError: Invalid count value at String.repeat ()
at Ys.setFinishMessage (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:304989)
at Ys.fail (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:305328)
at el (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:441152)
at async tl (/Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:442548)
at async /Users/mokevip/.npm/_npx/14ac50ce161843f7/node_modules/create-uni/dist/outfile.cjs:2:444206
🚀 遇到问题? 快速反馈:https://github.com/uni-helper/create-uni/issues/new/choose
使用的包管理器
pnpm
核对