-
-
Notifications
You must be signed in to change notification settings - Fork 705
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Environment
Nuxt project info: (copied to clipboard) 00:40:59
- Operating System: Darwin
- Node Version: v16.16.0
- Nuxt Version: 3.4.1
- Nitro Version: 2.3.3
- Package Manager: pnpm@8.2.0
- Builder: vite
- User Config: css, ssr, vite, modules, nitro, sitemap, tailwindcss, robots, image, pinia, app
- Runtime Modules: @nuxtjs/tailwindcss@6.6.5, @pinia/nuxt@0.4.7, @element-plus/nuxt@1.0.4, @nuxt/content@2.5.2, @nuxt/image-edge@1.0.0-28020728.5df24eb, nuxt-simple-sitemap@2.4.11, @nuxtjs/robots@3.0.0
- Build Modules: -
Reproduction
The developed project is local.
Describe the bug
After I upgraded to nuxt3.4.1 and started my project, I found that the consola dependency of @nuxt/content started to report errors.When I removed @nuxt/content, the project was able to start successfully.
Additional context
in my pnpm-lock.yaml:
/@nuxt/content@2.5.2:
resolution: {integrity: sha512-bSO4g2aNk7AT5abAIJtHLTN+FZFYMvwP6MH9oP6XAo/SsIowvFq7g38in3jK/OMDR+dZq3Nt1z8GrMDGipzsfQ==}
dependencies:
'@nuxt/kit': 3.2.3
consola: 2.15.3
defu: 6.1.2
destr: 1.2.2
...
Logs
[nuxt] [request error] [unhandled] [500] Named export 'consola' not found. The requested module 'consola' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'consola';
const { consola } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:128:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:194:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:385:24)
at async ./.nuxt/dev/index.mjs:4463:24
at async ./.nuxt/dev/index.mjs:4542:64
at async ./.nuxt/dev/index.mjs:437:22
at async Object.handler (./node_modules/.pnpm/h3@1.6.4/node_modules/h3/dist/index.mjs:1247:19)
at async Server.toNodeHandle (./node_modules/.pnpm/h3@1.6.4/node_modules/h3/dist/index.mjs:1322:7)
cerinoligutom and abdmdjr