uni-helper / vitesse-uni-app Goto Github PK
View Code? Open in Web Editor NEW由 Vite & uni-app 驱动的跨端快速启动模板
Home Page: https://vitesse-docs.netlify.app/
License: MIT License
由 Vite & uni-app 驱动的跨端快速启动模板
Home Page: https://vitesse-docs.netlify.app/
License: MIT License
https://uview-plus.jiangruyi.com/components/downloadSetting.html
不知道怎么配置easycom了
谷歌浏览器
pnpm
不知道是更新了什么组件,还是页面多了,现在代码稍微保存频繁一点,就自动崩溃了,说内存不足。
怎么增加内存设置?
Generated an empty chunk: "utils/apijson".
DONE Build complete. Watching for changes...
开始差量编译...
<--- Last few GCs --->
[30108:000001BD5F036480] 1230115 ms: Mark-Compact (reduce) 4054.7 (4143.0) -> 4054.0 (4143.5) MB, 2608.70 / 0.01 ms (average mu = 0.419, current mu = 0.010) allocation failure; scavenge might not succeed
[30108:000001BD5F036480] 1232789 ms: Mark-Compact (reduce) 4055.5 (4143.8) -> 4054.8 (4144.3) MB, 2669.42 / 0.01 ms (average mu = 0.251, current mu = 0.002) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF63C0B433F node::SetCppgcReference+15695
2: 00007FF63C02EC26 EVP_MD_meth_get_input_blocksize+78566
3: 00007FF63C030A11 EVP_MD_meth_get_input_blocksize+86225
4: 00007FF63CA9A7E1 v8::Isolate::ReportExternalAllocationLimitReached+65
5: 00007FF63CA83F78 v8::Function::Experimental_IsNopFunction+1336
6: 00007FF63C8E57E0 v8::Platform::SystemClockTimeMillis+659552
7: 00007FF63C8E2868 v8::Platform::SystemClockTimeMillis+647400
8: 00007FF63C8F7B7A v8::Platform::SystemClockTimeMillis+734202
9: 00007FF63C8F83F7 v8::Platform::SystemClockTimeMillis+736375
10: 00007FF63C906D1F v8::Platform::SystemClockTimeMillis+796063
11: 00007FF63C5C72E5 v8::CodeEvent::GetFunctionName+116773
12: 00007FF5DCB1AAFA
https://www.cnblogs.com/GoodMemoryBlog/p/17325015.html
这里有人说是 unocss 的 icon 插件问题,测试中 无效
现有的 .gitignore 没有忽略每次一构建时由各种插件生成的文件, 例如: auto-imports.d.ts .
这可能导致 IDE 经常提示文件的换行符不同, 加大开发者提交代码到仓库时需要进行的工作量.
建议在现有的 .gitignore 中补充由已经安装的插件生成的文件.
No response
No response
pnpm run dev:mp-alipay
error[Parse]: d:/qd/vitesse-uni-app/dist/dev/mp-alipay/composables/useQuery.js: Unexpected token
--> composables\useQuery.js:6:0
4 | const query = common_vendor.ref({});
5 | common_vendor.onLoad((q) => {
6 | query.value = q ?? {};
7 | });
8 | const value = common_vendor.computed(() => key ? query.value[common_vendor.unref(key)] : null);
9 | return { query, value };
Error: 构建报告不存在: C:\Users\86159\AppData\Local\Temp\minicode_compile_dy\devserver-uLkEzHGjyp-1704158834004
当前项目 pnpm run dev:mp-alipay,后运行到支付宝小程序开发者工具就会提示报错
node -v
v18.19.0
Need to install the following packages:
[email protected]
Ok to proceed? (y)
System:
OS: Windows 10 10.0.19044
CPU: (16) x64 AMD Ryzen 7 4800H with Radeon Graphics
Memory: 4.07 GB / 31.37 GB
Binaries:
Node: 18.19.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - D:\programfiles\nodejs\node_global\yarn.CMD
npm: 10.2.3 - D:\Program Files\nodejs\npm.CMD
pnpm: 6.32.1 - D:\programfiles\nodejs\node_global\pnpm.CMD
Browsers:
Chrome: bookmarks.html
initial_preferences
Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.43)
Internet Explorer: 11.0.19041.1566
pnpm
支持 uts uvue
支持 uts uvue
No response
No response
目前在vue模板中 template和route标签 保存的时候不能自动格式化, 导致样式凌乱
推荐使用eslint的格式化配置格式化 vue template 和 route里的 json yaml等
No response
No response
开发模式小程序模拟器报错找不到app.json
[ app.json 文件内容错误] app.json: 在项目根目录未找到 app.json (env: Windows,mp,1.06.2401020; lib: 3.4.2)
运行即可复现
基础环境信息:
Windows 10 10.0.19045
20.9.0
1.88.1
2.0.8
基础依赖信息:
3.3.8
5.0.12
3.0.0-alpha-4000020240111001
感谢使用uni-helper,请提供以上信息以便我们排查问题。
pnpm
运行命令:
npx rimraf pnpm-lock.yaml
yarn install
报错
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE package: '[email protected]',
npm warn EBADENGINE required: { node: '20 || >=22' },
npm warn EBADENGINE current: { node: 'v18.20.4', npm: '10.7.0' }
npm warn EBADENGINE }
只安装了nodejs v18.20.4
运行
npx rimraf pnpm-lock.yaml
yarn install
复现
no more needed
yarn
类型“{}”的参数不能赋给类型“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
由于vue3用了proxy对象,所以每个变量都需要加上.value,所以安装上Vue Macros可以解决这个问题
集成Vue Macros插件进来
No response
No response
希望把lint-staged代码提交规范检测加上
希望把lint-staged代码提交规范检测加上
No response
No response
请问在代码中我怎么才能设置默认亮色主题?或者将其移除。
System:
OS: Windows 10 10.0.19044
CPU: (4) x64 Intel(R) Core(TM) i5-6400 CPU @ 2.70GHz
Memory: 1.87 GB / 15.92 GB
Binaries:
Node: 16.13.0 - D:\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Local\pnpm\yarn.CMD
npm: 8.1.0 - D:\nodejs\npm.CMD
pnpm: 8.0.0 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Edge: Spartan (44.19041.1266.0), Chromium (114.0.1823.82)
Internet Explorer: 11.0.19041.1566
pnpm
pages.config.ts中pages中编译到pages.json中会把path路径排序
pages:[
{
"path": "pages/chat/index",
"type": "page"
},
{
"path": "pages/home/index",
"type": "page"
},
]
本来是home/index在前面的 编译之后就跑到后面去了
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz
Memory: 3.47 GB / 15.89 GB
Binaries:
Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.5.1 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.62)
Internet Explorer: 11.0.22621.1
pnpm
设置tabbar 后,重新运行,tabbar 配置会消失
运行微信小程序 pnpm run dev:mp-weixin
无
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400
Memory: 7.09 GB / 31.75 GB
Binaries:
Node: 18.14.0 - ~\AppData\Local\fnm_multishells\46128_1712652049469\node.EXE
Yarn: 1.22.19 - ~\AppData\Local\pnpm\yarn.CMD
npm: 9.3.1 - ~\AppData\Local\fnm_multishells\46128_1712652049469\npm.CMD
pnpm: 8.15.3 - ~\AppData\Local\pnpm\pnpm.CMD
Browsers:
Edge: Chromium (118.0.2088.57)
Internet Explorer: 11.0.19041.3636
npm
现在前端就是卷的,readme里 各种特性单词好像少一个都不够专业一样
要是不标上typescript更是就好像low了一样。
真的,中小项目上TS真的是自讨苦吃,如果再来个全栈一个人,那更是疯了哈哈。
希望提供NOTS版本。
No response
No response
在仓库里面发现了 vueuse 的自动导入, 但是尝试使用的时候直接报错
"TransitionGroup" is not exported by "node_modules/vue-demi/lib/index.mjs", imported by "node_modules/@vueuse/core/index.mjs".
<script lang="ts" setup>
const props = defineProps({
name: String,
})
const emits = defineEmits(['update:name'])
const { value: name } = useQuery('name')
const value = useVModel(props, 'name', emits)
</script>
<template>
<view>{{ name }}</view>
<HiCounter />
</template>
<route lang="json">
{
"layout": "home"
}
</route>
System:
OS: Windows 11 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz
Memory: 2.35 GB / 15.76 GB
Binaries:
Node: 21.5.0 - ~\.nvmd\versions\21.5.0\node.EXE
Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
npm: 10.2.4 - ~\.nvmd\versions\21.5.0\npm.CMD
pnpm: 8.9.2 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (120.0.2210.133)
Internet Explorer: 11.0.22621.1
pnpm
DONE Build complete. Watching for changes...
开始差量编译...
DONE Build complete. Watching for changes...
开始差量编译...
DONE Build complete. Watching for changes...
开始差量编译...
DONE Build complete. Watching for changes...
node:events:495
throw er; // Unhandled 'error' event
^
Error: EBUSY: resource busy or locked, lstat 'G:\DumpStack.log.tmp'
Emitted 'error' event on FSWatcher instance at:
at FSWatcher._handleError (file:///G:/project/other/uni-vite-ts/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/watch.js:4246:10)
at NodeFsHandler._boundHandleError (file:///G:/project/other/uni-vite-ts/node_modules/.pnpm/[email protected]/node_modules/rollup/dist/es/shared/watch.js:2720:43)
at ReaddirpStream.emit (node:events:517:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -4082,
code: 'EBUSY',
syscall: 'lstat',
path: 'G:\\DumpStack.log.tmp'
}
Node.js v18.18.0
ELIFECYCLE Command failed with exit code 1.
npx degit uni-helper/vitesse-uni-app uni-vite-ts
cd uni-vite-ts && pnpm i
pnpm run dev:mp-weixin
System:
OS: Windows 10 10.0.22621
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400F
Memory: 4.67 GB / 15.76 GB
Binaries:
Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
npm: 9.6.6 - G:\project\other\node_modules\.bin\npm.CMD
pnpm: 8.7.6 - C:\Program Files\nodejs\pnpm.CMD
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.36)
Internet Explorer: 11.0.22621.1
pnpm
主要原因应该是在vue-eslint-parser
上,目前没有找到合适的解决方案,可能需要vue-eslint-parser
支持
No response
No response
我遇到一个问题
要在 https 请求时,如果遇到token过期的情况,我需要在 请求结束后 重定向到 login 页,我希望在ts文件中写成通用的方法,但是当前的架构没有导出route对象
https://github.com/HW-maintenance/HW_maintenance_app.git
环境:微信开发工具
pnpm
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are awaiting their schedule. Click on a checkbox to get an update now.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@dcloudio/uni-app
, @dcloudio/uni-app-plus
, @dcloudio/uni-automator
, @dcloudio/uni-cli-shared
, @dcloudio/uni-components
, @dcloudio/uni-h5
, @dcloudio/uni-mp-alipay
, @dcloudio/uni-mp-baidu
, @dcloudio/uni-mp-jd
, @dcloudio/uni-mp-kuaishou
, @dcloudio/uni-mp-lark
, @dcloudio/uni-mp-qq
, @dcloudio/uni-mp-toutiao
, @dcloudio/uni-mp-weixin
, @dcloudio/uni-mp-xhs
, @dcloudio/uni-quickapp-webview
, @dcloudio/uni-stacktracey
, @dcloudio/uni-vue-devtools
, @dcloudio/vite-plugin-uni
)@uni-helper/eslint-config
, @uni-helper/vite-plugin-uni-components
, @unocss/eslint-config
, pnpm
, unocss
, unplugin-auto-import
).github/workflows/check.yml
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v3
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v3
actions/checkout v4
pnpm/action-setup v2
actions/setup-node v3
package.json
@dcloudio/uni-app 3.0.0-alpha-4000020240111001
@dcloudio/uni-app-plus 3.0.0-alpha-4000020240111001
@dcloudio/uni-components 3.0.0-alpha-4000020240111001
@dcloudio/uni-h5 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-alipay 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-baidu 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-jd 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-kuaishou 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-lark 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-qq 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-toutiao 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-weixin 3.0.0-alpha-4000020240111001
@dcloudio/uni-mp-xhs 3.0.0-alpha-4000020240111001
@dcloudio/uni-quickapp-webview 3.0.0-alpha-4000020240111001
@vueuse/core ^10.7.2
vue ^3.3.8
vue-i18n ^9.6.5
@dcloudio/types ^3.4.7
@dcloudio/uni-automator 3.0.0-alpha-4000020240111001
@dcloudio/uni-cli-shared 3.0.0-alpha-4000020240111001
@dcloudio/uni-stacktracey 3.0.0-alpha-4000020240111001
@dcloudio/uni-vue-devtools 3.0.0-alpha-4000020240111001
@dcloudio/vite-plugin-uni 3.0.0-alpha-4000020240111001
@iconify-json/carbon ^1.1.27
@types/node ^20.11.4
@uni-helper/eslint-config ^0.0.6
@uni-helper/uni-app-types ^0.5.12
@uni-helper/uni-env ^0.1.1
@uni-helper/unocss-preset-uni ^0.2.6
@uni-helper/vite-plugin-uni-components ^0.0.8
@uni-helper/vite-plugin-uni-layouts ^0.1.7
@uni-helper/vite-plugin-uni-manifest ^0.2.3
@uni-helper/vite-plugin-uni-pages ^0.2.14
@uni-helper/volar-service-uni-pages ^0.2.14
@unocss/eslint-config ^0.58.3
@vue/runtime-core ^3.3.8
@vue/tsconfig ^0.5.1
eslint ^8.56.0
lint-staged ^15.2.0
simple-git-hooks ^2.9.0
typescript ^5.3.3
unocss ^0.58.3
unplugin-auto-import ^0.17.3
vite ^5.0.11
vue-tsc ^1.8.27
pnpm 8.14.1
运行 dev:mp-weixin在微信小程序,报错ReferenceError: process is not defined
ReferenceError: process is not defined
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Memory: 37.89 MB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 18.0.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.5.1 - /usr/local/bin/npm
pnpm: 8.3.1 - /usr/local/bin/pnpm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Chrome: 116.0.5845.187
Safari: 14.1.2
npm
关于 UnoCss的border 属性,只能如下写才能生效,
如下面写法 就是不生效:
安装即可
System:
OS: Windows 10 10.0.19045
CPU: (16) x64 AMD Ryzen 7 5800U with Radeon Graphics
Memory: 5.27 GB / 15.31 GB
Binaries:
Node: 20.9.0 - C:\devtool\nodejs\node.EXE
npm: 10.1.0 - C:\devtool\nodejs\npm.CMD
pnpm: 8.15.4 - C:\devtool\nodejs\pnpm.CMD
Browsers:
Edge: Chromium (122.0.2365.59)
Internet Explorer: 11.0.19041.3636
pnpm
下面的是非uni-app,缩进提示的效果。
用 vscode 打开本项目。
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
(node:2120) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
(Use node --trace-deprecation ...
to show where the warning was created)
√ 请选择需要反馈的依赖 » @uni-helper/eslint-config
√ 请选择需要反馈的vscode插件 » uni-highlight-vscode
基础环境信息:
Windows 11 10.0.26100
22.2.0
1.90.0
2.0.10
基础依赖信息:
3.4.27
5.2.13
3.0.0-alpha-4000020240111001
uni-helper依赖信息:
0.0.6
8.57.0
uni-helper插件信息:
0.3.10
感谢使用uni-helper,请提供以上信息以便我们排查问题。
👉 uni-helper 官网: https://uni-helper.js.org/
👉 改进建议: https://github.com/uni-helper/create-uni/issues/new/choose
bun
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.