npm run dev fails silently when using npm — playground package.json uses "my-module": "latest" instead of "file:.."
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- nuxt, typescript
- Domain
- tooling
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.
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
- Dominant language
- TypeScript
- Stars
- 275
- Forks
- 35
- Avg merge
- 4h 42m
- Merged PRs (30d)
- 6
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.
More from nuxt/module-builder
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 48/100
nuxt/module-builder#764 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
nuxt/module-builder#754 ·
-
Conflict between folder structure in readme (src/runtime) and TypeScript config (src/module/runtime) Open
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
nuxt/module-builder#749 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
nuxt/module-builder#726 · 1 comment · 1 reaction ·
-
Running `dev:prepare` in the root of a module behaves differently than preparing in the playground Open
Difficulty 4/5 3-5 days Newbie friendliness 45/100
nuxt/module-builder#704 · 4 comments ·
All issues in nuxt/module-builder
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100