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

Failing in vue3/vite | Missing "./enable-check" export in "vue-tsx-support" package #121

Open
NorseGaud opened this issue Nov 20, 2021 · 5 comments

Comments

@NorseGaud
Copy link

NorseGaud commented Nov 20, 2021

❯ npm install slate-vue
... Success

main.js

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import vuex from "./vuex";
import './index.css'
import LoadScript from 'vue-plugin-load-script'
import { SlatePlugin } from 'slate-vue'
const app = createApp(App)
app.use(router)
app.use(LoadScript)
app.use(vuex)
app.use(SlatePlugin)
app.mount("#app")

Run dev vite

❯ npm run dev-nathan   

> project-flipflop@0.0.3 dev-nathan
> > mongodb.log && mkdir -p mongodb && mongod --dbpath ./mongodb --logpath ./mongodb.log --config /usr/local/etc/mongod.conf --logRotate reopen & vite

Pre-bundling dependencies:
  vue
  vue-plugin-load-script
  slate-vue
  vuex
  vue-router
  (...and 11 more)
(this will be run only when your dependencies or config have changed)
 > node_modules/vite/dist/node/chunks/dep-713b45e1.js:29682:7: error: [plugin: vite:dep-pre-bundle] Missing "./enable-check" export in "vue-tsx-support" package
    29682 │   throw new Error(
          ╵         ^
    at bail (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:29682:8)
    at resolve$1 (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:29758:10)
    at resolveExports (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:30261:12)
    at resolveDeepImport (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:30277:26)
    at tryNodeResolve (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:30019:11)
    at Context.resolveId (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:29880:28)
    at Object.resolveId (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:42340:55)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:68238:27
    at async /Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:62832:34

   node_modules/vite/dist/node/chunks/dep-713b45e1.js:62818:18: note: This error came from the "onResolve" callback registered here
    62818 │             build.onResolve({ filter: /^[\w@][^:]/ }...
          ╵                   ~~~~~~~~~
    at setup (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:62818:19)
    at handlePlugins (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:756:23)
    at Object.buildOrServe (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1044:7)
    at /Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1895:17
    at new Promise (<anonymous>)
    at Object.build (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1894:14)
    at Object.build (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1749:51)
    at optimizeDeps (/Users/norsegaud/project-flipflop/node_modules/vite/dist/node/chunks/dep-713b45e1.js:63070:34)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

   node_modules/slate-vue/dist/index.es.js:1:6: note: The plugin "vite:dep-pre-bundle" was triggered by this import
        1 │ import"vue-tsx-support/enable-check";import{componen...
          ╵       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error when starting dev server:
Error: Build failed with 1 error:
node_modules/vite/dist/node/chunks/dep-713b45e1.js:29682:7: error: [plugin: vite:dep-pre-bundle] Missing "./enable-check" export in "vue-tsx-support" package
    at failureErrorWithLog (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1493:15)
    at /Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1151:28
    at runOnEndCallbacks (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:941:63)
    at buildResponseToResult (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1149:7)
    at /Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:1258:14
    at /Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:629:9
    at handleIncomingPacket (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:726:9)
    at Socket.readFromStdout (/Users/norsegaud/project-flipflop/node_modules/esbuild/lib/main.js:596:7)
    at Socket.emit (node:events:394:28)
    at addChunk (node:internal/streams/readable:315:12)
@NorseGaud NorseGaud changed the title Failing in vue3/vite Failing in vue3/vite | Missing "./enable-check" export in "vue-tsx-support" package Nov 20, 2021
@towelong
Copy link

这个问题我也有,[plugin:vite:import-analysis] Missing "./enable-check" export in "vue-tsx-support" package

@PungYoung
Copy link

X [ERROR] [plugin vite:dep-pre-bundle] Missing "./enable-check" export in "vue-tsx-support" package

@Artawower
Copy link

Any news or workaround?

@zhongfeixu
Copy link

image

@chengazhen
Copy link

需要把 vue-tsx-support 里面的字段注释掉!大概率是字段兼容问题。
image

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

6 participants