npm run dev fails silently when using npm — playground package.json uses "my-module": "latest" instead of "file:.."
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 275
- Forks
- 35
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 6
Description
Description
When scaffolding a new Nuxt module with npm create nuxt -- -t module my-module and using npm (not pnpm),
the playground cannot resolve the local module, causing the plugin to never be injected and myModule
to be ignored in nuxt.config.ts — with no error in the console.
Root cause
The generated playground/package.json has:
"dependencies": {
"my-module": "latest"
}
Steps to reproduce
npm create nuxt -- -t module my-modulecd my-modulenpm run dev- Plugin from
src/runtime/plugin.tsis never injected — no error shown
Fix
Change playground/package.json to use "file:..":
"dependencies": {
"my-module": "file:.."
}
Environment
- npm: 11.10.0
- nuxt: 4.3.1
- @nuxt/module-builder: 1.0.2
- OS: Windows 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated playground/package.json and compare its dependency entry with the npm reproduction steps. Verify the generated package points to the local module, then run npm run dev and confirm that the plugin from src/runtime/plugin.ts is injected and myModule is no longer ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxt, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100