zeokku / vite-plugin-vue-css-modules

✨ Ultimate solution for using CSS modules without any hassle.
17 stars 0 forks source link

[plugin:Vue CSS Modules] babelTraverse is not a function #9

Closed thisVioletHydra closed 1 year ago

thisVioletHydra commented 1 year ago
15:08:14 [vite] Internal server error: babelTraverse is not a function
  Plugin: Vue CSS Modules
  File: C:/www/idp-panel/front/src/components/Global/LangSwitcher/LangSwitcher.vue
      at transformJsValue (file:///C:/www/idp-panel/front/node_modules/vite-plugin-vue-css-modules/dist/transformJsValue.js:15:5)
      at DomHandler.elementCB (file:///C:/www/idp-panel/front/node_modules/vite-plugin-vue-css-modules/dist/transformHtml.js:55:33)
      at DomHandler.onclosetag (file:///C:/www/idp-panel/front/node_modules/domhandler/lib/esm/index.js:72:18)
      at Parser.onclosetag (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Parser.js:227:34)
      at Tokenizer.stateInClosingTagName (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Tokenizer.js:390:22)
      at Tokenizer.parse (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Tokenizer.js:784:26)
      at Tokenizer.write (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Tokenizer.js:155:14)
      at Parser.write (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Parser.js:432:28)
      at Parser.end (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Parser.js:448:18)
      at Parser.parseComplete (file:///C:/www/idp-panel/front/node_modules/htmlparser2/lib/esm/Parser.js:401:14)
babelTraverse is not a function
"vite-plugin-vue-css-modules": "^3.1.3",
C:\www\idp-panel\front development ❯ node -v                                                                 14:37:19
v20.2.0
<!-- TEMPLATE -->
<template>
  <div class="box" :class="{ box__opened: 'modalState' }">
    <p>
      Lorem ipsum dolor sit amet consectetur adipisicing elit. Illo ipsa voluptatum facere rem omnis repellendus
      voluptates velit atque sunt odio inventore qui neque possimus corporis, soluta odit error ad. Deleniti!
    </p>
  </div>
</template>

<!-- - ⚡ - -->

<!-- SCRIPT -->
<script lang="ts" setup></script>
<!-- - ⚡ - -->

<!-- STYLE -->
<style lang="postcss" module>
  .box {
    display: grid;
    grid-auto-flow: column;
    grid-gap: 0;
    position: relative;
  }
</style>
Lutymane commented 1 year ago

should be fixed in 3.1.4