Skip to content
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

Cannot read property 'extraTransformTargets' of undefined #39

Open
Della0o0 opened this issue Jan 6, 2023 · 5 comments
Open

Cannot read property 'extraTransformTargets' of undefined #39

Della0o0 opened this issue Jan 6, 2023 · 5 comments

Comments

@Della0o0
Copy link

Della0o0 commented Jan 6, 2023

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

@harlan-zw
Copy link
Member

Could you provide your windi config?

@baoxianggao
Copy link

i have the same problem

@guohui666
Copy link

guohui666 commented Jan 9, 2023

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)

@Della0o0
Copy link
Author

Della0o0 commented Jan 30, 2023

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)

请问你解决了吗?

@guohui666
Copy link

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)

请问你解决了吗?

我的问题似乎解决了,将原有服务器上项目的中文路径换成了英文,服务器打包就成功了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants