nuxt-dev-ready
Waits until the Nuxt dev server is loaded. Mainly useful for testing.
17,769
| Install | |
|---|---|
npm install nuxt-dev-ready |
|
| Latest Version: | 6.0.0 |
| Older releases: | 3 |
| License: | MIT |
| Last Updated: | Oct 22, 2026 |
| Links: | GitHub · npm |
Maintainer: dword-design
nuxt-dev-ready
Waits until the Nuxt dev server is loaded. Mainly useful for testing.
Install
# npm
$ npm install nuxt-dev-ready
# Yarn
$ yarn add nuxt-dev-ready
Usage
import { execaCommand } from 'execa';
import kill from 'tree-kill-promise';
import nuxtDevReady from 'nuxt-dev-ready';
const nuxt = execaCommand('nuxt dev');
try {
await nuxtDevReady();
// Do some testing
} finally {
await kill(nuxt.pid);
}
Custom port
You can pass a custom port to nuxtDevReady like so:
import { execaCommand } from 'execa';
import kill from 'tree-kill-promise';
import nuxtDevReady from 'nuxt-dev-ready';
const nuxt = execaCommand('nuxt dev', { env: { PORT: 4000 } });
try {
await nuxtDevReady(4000);
} finally {
await kill(nuxt.pid);
}
Contribute
Are you missing something or want to contribute? Feel free to file an issue or a pull request! ⚙️
Support
Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:
Thanks a lot for your support! ❤️
License
Related Packages
Version History
| Version | Released | License |
|---|---|---|
| 6.0.0 | MIT | |
| 5.0.1 | MIT | |
| 5.0.0 | MIT | |
| 4.0.1 | MIT | |
| 4.0.0 | MIT | |
| 3.0.0 | MIT | |
| 2.0.1 | MIT | |
| 2.0.0 | MIT | |
| 1.1.2 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.0 | MIT |