-
Notifications
You must be signed in to change notification settings - Fork 297
🐛 [Bug]: 运行 npm run build:runtime 报错 #3134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
It seems like you're encountering an error when running Here are a few steps you can take to troubleshoot and potentially resolve this issue:
If you need further assistance, please let me know, and I can help you search for similar issues or provide more specific guidance. 🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
Title: 🐛 [Bug]: Run npm run build:runtime error |
我使用的是 windows 11, vite 6.1.0 |
I'm using windows 11, vite 6.1.0 |
使用 node v22 会报错,node v18 运行正常 |
Using node v22 will report an error, node v18 will run normally |
Version
latest
Vue Version
latest
Link to minimal reproduction
无
Step to reproduce
1、Node.js v22.12.0
2、拉取dev分支代码
3、运行 pnpm install
4、运行 npm run build:runtime
5、运行报错
D:\product\tiny-engine\tiny-ui>npm run build:runtime
npm run build:entry done. [packages/vue-runtime/all.ts]
npm run build:entry done. [packages/vue-runtime/pc.ts]
npm run build:entry done. [packages/vue-runtime/mobile-first.ts]
npm run build:entry done. [packages/vue-runtime/simple.ts]
====== 开始构建 TINY for vue2: runtime ======
vite v6.1.0 building for production...
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers
✓ 106 modules transformed.
../../packages/vue-runtime/dist2/tiny-vue-locale.mjs 186.04 kB │ gzip: 52.67 kB
✓ built in 7.35s
====== 开始构建 TINY for vue2: runtime ======
vite v6.1.0 building for production...
babelHelpers: 'bundled' option was used by default. It is recommended to configure this option explicitly, read more here: https://github.com/rollup/plugins/tree/master/packages/babel#babelhelpers
✓ 3 modules transformed.
x Build failed in 606ms
node:internal/process/promises:394
triggerUncaughtException(err, true /* fromPromise */);
^
[vite:css] [less] name is not defined. Maybe you forgot to pass the function to parentFunction?
file: D:/product/tiny-engine/tiny-ui/packages/theme/src/base/index.less:undefined:undefined
at process (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\vite@6.1.0@types+node@20.17.17_jiti@2.4.2_less@4.2.2_sass@1.84.0_terser@5.38.1_tsx@4.19.2_yaml@2.7.0\node_modules\vite\dist\node\chunks\dep-CfG9u7Cn.js:49998:33)
at async compileCSSPreprocessors (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\vite@6.1.0@types+node@20.17.17_jiti@2.4.2_less@4.2.2_sass@1.84.0_terser@5.38.1_tsx@4.19.2_yaml@2.7.0\node_modules\vite\dist\node\chunks\dep-CfG9u7Cn.js:48851:28)
at async compileCSS (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\vite@6.1.0_@types+node@20.17.17_jiti@2.4.2_less@4.2.2_sass@1.84.0_terser@5.38.1_tsx@4.19.2_yaml@2.7.0\node_modules\vite\dist\node\chunks\dep-CfG9u7Cn.js:48898:32)
at async Object.transform (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\vite@6.1.0_@types+node@20.17.17_jiti@2.4.2_less@4.2.2_sass@1.84.0_terser@5.38.1_tsx@4.19.2_yaml@2.7.0\node_modules\vite\dist\node\chunks\dep-CfG9u7Cn.js:48271:11)
at async transform (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\rollup@4.34.6\node_modules\rollup\dist\es\shared\node-entry.js:20698:16)
at async ModuleLoader.addModuleSource (D:\product\tiny-engine\tiny-ui\node_modules.pnpm\rollup@4.34.6\node_modules\rollup\dist\es\shared\node-entry.js:20911:36) {
loc: {
file: 'D:/product/tiny-engine/tiny-ui/packages/theme/src/base/index.less',
line: undefined,
column: undefined
},
code: 'PLUGIN_ERROR',
plugin: 'vite:css',
hook: 'transform',
id: 'D:/product/tiny-engine/tiny-ui/packages/theme/src/base/index.less',
watchFiles: [
'D:/product/tiny-engine/tiny-ui/packages/vue-common/src/index.ts',
'D:\product\tiny-engine\tiny-ui\packages\vue-common\package.json',
'D:\product\tiny-engine\tiny-ui\packages\vue-hooks\package.json',
'D:/product/tiny-engine/tiny-ui/packages/vue-common/src/adapter/index.ts',
'D:/product/tiny-engine/tiny-ui/packages/vue-common/src/usedefer.ts',
'D:/product/tiny-engine/tiny-ui/packages/vue-common/package.json',
'D:/product/tiny-engine/tiny-ui/packages/vue-common/src/csscls.ts',
'D:/product/tiny-engine/tiny-ui/packages/theme/src/base/index.less'
]
}
Node.js v22.12.0
What is expected
无
What is actually happening
无
What is your project name
无
Any additional comments (optional)
No response
The text was updated successfully, but these errors were encountered: