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

ERROR Cannot find module './compose/composer.js' #313

Open
cikomesi opened this issue Dec 16, 2024 · 1 comment
Open

ERROR Cannot find module './compose/composer.js' #313

cikomesi opened this issue Dec 16, 2024 · 1 comment

Comments

@cikomesi
Copy link

cikomesi commented Dec 16, 2024

I try the min example to get error :

  • node: 22.11.0
  • pnpm: 9.14.2

nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    compatibilityDate: '2024-11-01',
    devtools: {enabled: true},
    modules: ['@nuxtjs/mdc']
})

package.json

{
  "name": "nuxt-app",
  "private": true,
  "type": "module",
  "scripts": {
    "build": "nuxt build",
    "dev": "nuxt dev",
    "generate": "nuxt generate",
    "preview": "nuxt preview",
    "postinstall": "nuxt prepare"
  },
  "dependencies": {
    "@nuxtjs/mdc": "^0.11.1",
    "nuxt": "^3.14.1592",
    "vue": "latest",
    "vue-router": "latest"
  },
  "packageManager": "[email protected]+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
}

app.vue

<template>
  <div>
    <NuxtPage/>
  </div>
</template>

pages/index
( if i remove <MDC :value="md" />, it works well )

<script setup lang="ts">
const md = `# Welcome to docs4.dev`
</script>

<template>
  121
  <MDC :value="md" />
</template>

<style scoped>

</style>

when i run dev:

Image

console

Nuxt 3.14.1592 with Nitro 2.10.4                                                                              03:40:01
                                                                                                              03:40:01
  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

  ➜ DevTools: press Shift + Alt + D in the browser (v1.6.4)                                                                                                                                     03:40:04

√ Vite client built in 34ms                                                                                                                                                                     03:40:05
√ Vite server built in 464ms                                                                                                                                                                    03:40:05
√ Nuxt Nitro server built in 695 ms                                                                                                                                                       nitro 03:40:06
i Vite client warmed up in 0ms                                                                                                                                                                  03:40:06  
i Vite server warmed up in 488ms                                                                                                                                                                03:40:07

 WARN  [Vue Router warn]: uncaught error during route navigation:


 ERROR  Cannot find module './compose/composer.js'
Require stack:
- C:\Users\vpt94\Desktop\nuxt3_mdc_starter\yaml

  Require stack:
  - yaml
  at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
  at Function._load (node:internal/modules/cjs/loader:1075:27)
  at TracingChannel.traceSync (node:diagnostics_channel:315:14)
  at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
  at Module.require (node:internal/modules/cjs/loader:1340:12)
  at require (node:internal/modules/helpers:141:16)
  at yaml:3:16
  at ViteNodeRunner.runModule (/C:/Users/vpt94/Desktop/nuxt3_mdc_starter/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite-node/dist/client.mjs:399:11)
  at ViteNodeRunner.directRequest (/C:/Users/vpt94/Desktop/nuxt3_mdc_starter/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite-node/dist/client.mjs:381:16)
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)


 WARN  [Vue Router warn]: uncaught error during route navigation:


 ERROR  Cannot find module './compose/composer.js'
Require stack:
- C:\Users\vpt94\Desktop\nuxt3_mdc_starter\yaml

  Require stack:
  - yaml
  at Function._resolveFilename (node:internal/modules/cjs/loader:1249:15)
  at Function._load (node:internal/modules/cjs/loader:1075:27)
  at TracingChannel.traceSync (node:diagnostics_channel:315:14)
  at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
  at Module.require (node:internal/modules/cjs/loader:1340:12)
  at require (node:internal/modules/helpers:141:16)
  at yaml:3:16
  at ViteNodeRunner.runModule (/C:/Users/vpt94/Desktop/nuxt3_mdc_starter/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite-node/dist/client.mjs:399:11)
  at ViteNodeRunner.directRequest (/C:/Users/vpt94/Desktop/nuxt3_mdc_starter/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/vite-node/dist/client.mjs:381:16)
  at process.processTicksAndRejections (node:internal/process/task_queues:105:5)


 WARN  [nuxt] Failed to stringify dev server logs. Received DevalueError: Cannot stringify arbitrary non-POJOs. You can define your own reducer/reviver for rich types following the instructions in https://nuxt.com/docs/api/composables/use-nuxt-app#payload.




@cikomesi
Copy link
Author

nuxt-content also find this error:

nuxt/content#2918

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

1 participant