unjs / undocs

Minimal Documentation theme and CLI for shared usage across UnJS projects.
https://undocs.pages.dev/
MIT License
145 stars 12 forks source link

No package manager auto-detected #71

Closed ahmedragab20 closed 4 months ago

ahmedragab20 commented 4 months ago

Environment

package.json

{
  "private": true,
  "name": "docs",
  "scripts": {
    "dev": "undocs dev",
    "build": "undocs build"
  },
  "devDependencies": {
    "undocs": "latest"
  }
}

node version

v20.10.0

Reproduction

1)

pnpx giget gh:unjs/undocs/template docs --install

you'll get:

ERROR No package manager auto-detected.

2)

pnpm install

3)

pnpm dev

ERROR Cannot start nuxt: Cannot find module nuxt imported from file:///Users/usr/dir/Projects/dir/dir/.docs, file:///Users/usr/dir/Projects/dir/dir/, file:///Users/usr/dir/Projects/dir/dir/.docs/_index.js, file:///Users/usr/dir/Projects/dir/dir/node_modules

Describe the bug

after following the Reproduction steps, run the dev, the local will stay pending.

image

Additional context

No response

Logs

at \_resolve (.../doc/node_modules/.pnpm/mlly@1.6.1/node_modules/mlly/dist/index.mjs:2107:19)
at resolveSync (.../doc/node_modules/.pnpm/mlly@1.6.1/node_modules/mlly/dist/index.mjs:2116:10)
at resolvePathSync (.../doc/node_modules/.pnpm/mlly@1.6.1/node_modules/mlly/dist/index.mjs:2126:24)
at resolvePath (.../doc/node_modules/.pnpm/mlly@1.6.1/node_modules/mlly/dist/index.mjs:2130:28)
at importModule (.../doc/node_modules/.pnpm/@nuxt+kit@3.10.3/node_modules/@nuxt/kit/dist/index.mjs:2249:30)
at Module.buildNuxt (.../doc/node_modules/.pnpm/@nuxt+kit@3.10.3/node_modules/@nuxt/kit/dist/index.mjs:2597:130)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)
at async NuxtDevServer.\_load (.../doc/node_modules/.pnpm/nuxi@3.10.1/node_modules/nuxi/dist/chunks/dev2.mjs:279:5)
at async NuxtDevServer.load (.../doc/node_modules/.pnpm/nuxi@3.10.1/node_modules/nuxi/dist/chunks/dev2.mjs:184:7)
peterroe commented 4 months ago

Try bun install and bun dev maybe could help you :)

pi0 commented 4 months ago

Hi. This should have been fixed in latest giget/nypm releases. (pm is autodetected from command)