Skip to content

Instantly share code, notes, and snippets.

@devinschumacher
Last active April 28, 2025 03:49
Show Gist options
  • Save devinschumacher/e8a7401b08d5375d0ce44cd22a4c5ef8 to your computer and use it in GitHub Desktop.
Save devinschumacher/e8a7401b08d5375d0ce44cd22a4c5ef8 to your computer and use it in GitHub Desktop.
How to Disable Node.js Experimental Warnings in Terminal | Suppress terminal noise
title description tags
How to Disable Node.js Experimental Warnings in Terminal
Learn how to easily suppress Node.js experimental warnings in your terminal using the suppress-experimental-warnings package. Perfect for Nuxt, Next.js, or any Node-based project.
node
nuxt
devops
cli

How to Disable Node.js Experimental Warnings in Terminal | Step-by-Step Guide

Tired of those noisy ExperimentalWarning messages cluttering your terminal during development?

Here’s how you can easily suppress them across your scripts using the suppress-experimental-warnings package.

Click here to watch the video 👇


1. Install suppress-experimental-warnings

pnpm add suppress-experimental-warnings -D

2. Update your package.json Scripts

Modify your package.json to inject the suppression automatically into your Node processes by adding this before each command:

NODE_OPTIONS=--require=suppress-experimental-warnings

{
  "scripts": {
    "dev": "NODE_OPTIONS=--require=suppress-experimental-warnings nuxt dev",
    "build": "NODE_OPTIONS=--require=suppress-experimental-warnings nuxt build",
    "start": "NODE_OPTIONS=--require=suppress-experimental-warnings nuxt start",

    "dev:win": "cross-env NODE_OPTIONS=--require=suppress-experimental-warnings nuxt dev"
  }
}

Note:
For Windows compatibility, use cross-env to set environment variables properly (dev:win example above).


3. Run Your Project Without Warnings

Now, when you run:

pnpm dev

You should see a clean terminal — no more ExperimentalWarning spam!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment