opentiny / tiny-vue

TinyVue is an enterprise-class UI component library of OpenTiny community, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.
https://opentiny.design/tiny-vue
MIT License
1.44k stars 238 forks source link

🐛 [Bug]: pnpm dev2/2.6 crashed #532

Closed pe-3 closed 8 months ago

pe-3 commented 9 months ago

Version

仓库代码

Vue Version

2.6.14

Link to minimal reproduction

https://github.com/opentiny/tiny-vue

Step to reproduce

pnpm dev2

What is expected

No response

What is actually happening

VITE v4.3.8 ready in 2074 ms

➜ Local: http://localhost:7126/ ➜ Inspect: http://localhost:7126/__inspect/

➜ press h to show help ENOENT: no such file or directory, open '/Users/guoxiaodong/code/tiny-react/packages/theme/src/svgs/Left-ward-arrow.svg' ✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "getCurrentInstance"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:9:
  6 │ import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, rea...
    ╵          ~~~~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "inject"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:29:
  6 │ import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, rea...
    ╵                              ~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onUnmounted"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:37:
  6 │ import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, rea...
    ╵                                      ~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onDeactivated"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:50:
  6 │ import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, rea...
    ╵                                                   ~~~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onActivated"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:65:
  6 │ ... getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive...
    ╵                                                             ~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "computed"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:78:
  6 │ ...Instance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provid...
    ╵                                                               ~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "unref"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:88:
  6 │ ... inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, w...
    ╵                                                                ~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "watchEffect"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:95:
  6 │ ...nUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shal...
    ╵                                                             ~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "defineComponent"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:108:
  6 │ ...eactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTic...
    ╵                                                           ~~~~~~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "reactive"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:125:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                ~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "h"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:135:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                          ^

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "provide"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:138:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                             ~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "ref"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:147:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                                      ~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "watch"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:152:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                                           ~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "shallowRef"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:159:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                                                  ~~~~~~~~~~

✘ [ERROR] No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "nextTick"

../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:171:
  6 │ ...onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';
    ╵                                                                                                              ~~~~~~~~

/Users/guoxiaodong/code/tiny-react/node_modules/.pnpm/esbuild@0.17.19/node_modules/esbuild/lib/main.js:1636 let error = new Error(${text}${summary}); ^

Error: Build failed with 16 errors: ../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:9: ERROR: No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "getCurrentInstance" ../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:29: ERROR: No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "inject" ../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:37: ERROR: No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onUnmounted" ../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:50: ERROR: No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onDeactivated" ../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs:6:65: ERROR: No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onActivated" ... at failureErrorWithLog (/Users/guoxiaodong/code/tiny-react/node_modules/.pnpm/esbuild@0.17.19/node_modules/esbuild/lib/main.js:1636:15) at /Users/guoxiaodong/code/tiny-react/node_modules/.pnpm/esbuild@0.17.19/node_modules/esbuild/lib/main.js:1048:25 at /Users/guoxiaodong/code/tiny-react/node_modules/.pnpm/esbuild@0.17.19/node_modules/esbuild/lib/main.js:1512:9 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {

errors: [
    {
      detail: undefined,
      id: '',
      location: {
        column: 9,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 18,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "getCurrentInstance"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 29,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 6,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "inject"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 37,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 11,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onUnmounted"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 50,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 13,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onDeactivated"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 65,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 11,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "onActivated"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 78,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 8,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "computed"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 88,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 5,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "unref"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 95,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 11,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "watchEffect"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 108,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 15,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "defineComponent"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 125,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 8,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "reactive"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 135,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 1,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "h"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 138,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 7,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "provide"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 147,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 3,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "ref"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 152,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 5,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "watch"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 159,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 10,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "shallowRef"'
    },
    {
      detail: undefined,
      id: '',
      location: {
        column: 171,
        file: '../../node_modules/.pnpm/vue-router@4.1.5_vue@3.3.4/node_modules/vue-router/dist/vue-router.mjs',
        length: 8,
        line: 6,
        lineText: "import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue';",
        namespace: '',
        suggestion: ''
      },
      notes: [],
      pluginName: '',
      text: 'No matching export in "../../node_modules/.pnpm/vue@2.6.14/node_modules/vue/dist/vue.esm.js" for import "nextTick"'
    }
  ],
  warnings: []
}

Node.js v18.18.0

Any additional comments (optional)

请修复此报错

Binks123 commented 9 months ago

The same error is reported. Node.js v18.18.0

zzcr commented 8 months ago

目前已可以正常启动vue2

Issues-translate-bot commented 8 months ago

Bot detected the issue body's language is not English, translate it automatically.


Vue2 can now be started normally