Open Della0o0 opened 1 year ago
Could you provide your windi config?
i have the same problem
i have the same problem
目前发现,本地打包是没问题的,服务器打包出现了问题
local
windows 11
node v16.18.0
server
CentOS Linux release 7.4.1708 (Core)
node v14.17.0
"vue-cli-plugin-windicss": "1.1.6",
"vue": "^2.6.11",
"@vue/cli-plugin-babel": "~4.4.0",
"@vue/cli-plugin-eslint": "~4.4.0",
"@vue/cli-plugin-router": "~4.4.0",
"@vue/cli-plugin-vuex": "~4.4.0",
"@vue/cli-service": "~4.4.0",
import { defineConfig } from 'windicss/helpers'
export default defineConfig({
attributify: {
prefix: 'w:'
},
preflight: false,
theme: {
extend: {
textColor: {
main: 'var(--main-text-color)',
sub: 'var(--text-sub-color)',
tip: 'var(--text-tip-color)',
money: 'var(--text-red-color)'
}
}
}
})
/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662
if (options.scanOptions.extraTransformTargets.detect.some((i) => typeof i === "string" ? i === id : i(id)))
^
TypeError: Cannot read property 'extraTransformTargets' of undefined
at Object.isDetectTarget (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662:29)
at Object.include [as resource] (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/windicss-webpack-plugin/dist/plugin.cjs:159:40)
at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:492:30)
at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:547:10)
at RuleSet.exec (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:475:8)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:270:34
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/neo-async/async.js:6883:13
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:215:9
at callback (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/hard-source-webpack-plugin/lib/CacheEnhancedResolve.js:333:13)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:180:13
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24
at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:43:26
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24
at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24
at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:68:10
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24
at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1)
at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24
at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
Could you provide your windi config? vue.config.js
pluginOptions: { windicss: { preflight: false } }
i have the same problem
目前发现,本地打包是没问题的,服务器打包出现了问题
- local
windows 11
node v16.18.0
- server
CentOS Linux release 7.4.1708 (Core)
node v14.17.0
"vue-cli-plugin-windicss": "1.1.6", "vue": "^2.6.11", "@vue/cli-plugin-babel": "~4.4.0", "@vue/cli-plugin-eslint": "~4.4.0", "@vue/cli-plugin-router": "~4.4.0", "@vue/cli-plugin-vuex": "~4.4.0", "@vue/cli-service": "~4.4.0",
import { defineConfig } from 'windicss/helpers' export default defineConfig({ attributify: { prefix: 'w:' }, preflight: false, theme: { extend: { textColor: { main: 'var(--main-text-color)', sub: 'var(--text-sub-color)', tip: 'var(--text-tip-color)', money: 'var(--text-red-color)' } } } })
/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662 if (options.scanOptions.extraTransformTargets.detect.some((i) => typeof i === "string" ? i === id : i(id))) ^ TypeError: Cannot read property 'extraTransformTargets' of undefined at Object.isDetectTarget (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662:29) at Object.include [as resource] (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/windicss-webpack-plugin/dist/plugin.cjs:159:40) at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:492:30) at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:547:10) at RuleSet.exec (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:475:8) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:270:34 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/neo-async/async.js:6883:13 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:215:9 at callback (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/hard-source-webpack-plugin/lib/CacheEnhancedResolve.js:333:13) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:180:13 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:43:26 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:68:10 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
请问你解决了吗?
Could you provide your windi config? vue.config.js
pluginOptions: { windicss: { preflight: false } }
i have the same problem 目前发现,本地打包是没问题的,服务器打包出现了问题
- local
windows 11
node v16.18.0
- server
CentOS Linux release 7.4.1708 (Core)
node v14.17.0
"vue-cli-plugin-windicss": "1.1.6", "vue": "^2.6.11", "@vue/cli-plugin-babel": "~4.4.0", "@vue/cli-plugin-eslint": "~4.4.0", "@vue/cli-plugin-router": "~4.4.0", "@vue/cli-plugin-vuex": "~4.4.0", "@vue/cli-service": "~4.4.0",
import { defineConfig } from 'windicss/helpers' export default defineConfig({ attributify: { prefix: 'w:' }, preflight: false, theme: { extend: { textColor: { main: 'var(--main-text-color)', sub: 'var(--text-sub-color)', tip: 'var(--text-tip-color)', money: 'var(--text-red-color)' } } } })
/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662 if (options.scanOptions.extraTransformTargets.detect.some((i) => typeof i === "string" ? i === id : i(id))) ^ TypeError: Cannot read property 'extraTransformTargets' of undefined at Object.isDetectTarget (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/@windicss/plugin-utils/dist/index.js:662:29) at Object.include [as resource] (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/windicss-webpack-plugin/dist/plugin.cjs:159:40) at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:492:30) at RuleSet._run (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:547:10) at RuleSet.exec (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/RuleSet.js:475:8) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:270:34 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/neo-async/async.js:6883:13 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/webpack/lib/NormalModuleFactory.js:215:9 at callback (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/hard-source-webpack-plugin/lib/CacheEnhancedResolve.js:333:13) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:180:13 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:43:26 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:68:10 at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:28:1) at /data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/enhanced-resolve/lib/Resolver.js:284:24 at eval (eval at create (/data/jenkins/workspace/front-formal运营管理端admin-project/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:27:1)
请问你解决了吗?
我的问题似乎解决了,将原有服务器上项目的中文路径换成了英文,服务器打包就成功了。
node v14.16.0
TypeError: Cannot read property 'extraTransformTargets' of undefined at Object.isDetectTarget (F:\Projects\wocenter-admin-ui\node_modules\@windicss\plugin-utils\dist\index.js:662:29) at Object.include [as resource] (F:\Projects\wocenter-admin-ui\node_modules\windicss-webpack-plugin\dist\plugin.cjs:159:40) at RuleSet._run (F:\Projects\wocenter-admin-ui\node_modules\webpack\lib\RuleSet.js:492:30) at RuleSet._run (F:\Projects\wocenter-admin-ui\node_modules\webpack\lib\RuleSet.js:547:10) at RuleSet.exec (F:\Projects\wocenter-admin-ui\node_modules\webpack\lib\RuleSet.js:475:8) at F:\Projects\wocenter-admin-ui\node_modules\webpack\lib\NormalModuleFactory.js:270:34 at F:\Projects\wocenter-admin-ui\node_modules\neo-async\async.js:6883:13 at F:\Projects\wocenter-admin-ui\node_modules\webpack\lib\NormalModuleFactory.js:215:9 at F:\Projects\wocenter-admin-ui\node_modules\enhanced-resolve\lib\Resolver.js:180:13 at F:\Projects\wocenter-admin-ui\node_modules\enhanced-resolve\lib\Resolver.js:284:24 at eval (eval at create (F:\Projects\wocenter-admin-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10),:12:1)
at F:\Projects\wocenter-admin-ui\node_modules\enhanced-resolve\lib\UnsafeCachePlugin.js:43:26
at F:\Projects\wocenter-admin-ui\node_modules\enhanced-resolve\lib\Resolver.js:284:24
at eval (eval at create (F:\Projects\wocenter-admin-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), :12:1)
at F:\Projects\wocenter-admin-ui\node_modules\enhanced-resolve\lib\Resolver.js:284:24
at eval (eval at create (F:\Projects\wocenter-admin-ui\node_modules\tapable\lib\HookCodeFactory.js:33:10), :27:1)
npm ERR! code ELIFECYCLE