antfu / vitesse-nuxt

Vitesse for Nuxt 3 🏔💚⚡️
https://vitesse-nuxt3.netlify.app/
MIT License
1.74k stars 231 forks source link

The requested module 'vue' does not provide an export named 'default' #61

Open AndrewBogdanovTSS opened 2 years ago

AndrewBogdanovTSS commented 2 years ago

Describe the bug

The current state of the repo is broken with the error:

The requested module 'vue' does not provide an export named 'default'

at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:527:24)

Reproduction

https://stackblitz.com/github/antfu/vitesse-nuxt3

System Info

OS: Windows 10 10.0.19044
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 15.85 GB / 31.90 GB
  Binaries:
    Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.17 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.3.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (105.0.1343.50)
    Internet Explorer: 11.0.19041.1566

Used Package Manager

pnpm

Validations

yufanzheng0723 commented 2 years ago

Hi, I don't know if you used auto-import, the last time I reported this error was because there was something wrong with this auto-import

yufanzheng0723 commented 2 years ago

If you use a component library, such as element-plus, and use auto-import, you can check if the component is not imported successfully

AndrewBogdanovTSS commented 2 years ago

@yufanzheng0723 I provided a repo that you can check what exact libs and settings I use.

sgaconsultores commented 1 year ago

Any news? I have this error in a fresh cloned project after npm install

`> postinstall

nuxt prepare

Nuxi 3.5.0 6:35:08 PM

ERROR The requested module 'vue' does not provide an export named 'computed' 6:35:09 PM

import { getCurrentInstance, inject, onUnmounted, onDeactivated, onActivated, computed, unref, watchEffect, defineComponent, reactive, h, provide, ref, watch, shallowRef, nextTick } from 'vue'; ^^^^^^^^ SyntaxError: The requested module 'vue' does not provide an export named 'computed' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) `

g1ronn1mo commented 1 year ago

Try pnpm instead

antfu commented 1 year ago

Is this problem still reproducible?