
Research
Node.js Fixes AsyncLocalStorage Crash Bug That Could Take Down Production Servers
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.
This module helps normalise your environment variables. It is part of the moped suite of utilities for creating composable configs for building node.js and react apps.
This module helps normalise your environment variables. It is part of the moped suite of utilities for creating composable configs for building node.js and react apps.
You must load env before all other modules.
yarn add --dev @moped/env
If you want your users to specify NODE_ENV manually:
import '@moped/env/auto';
import * as webpack from 'webpack;
In your build file:
import '@moped/env/production';
import * as webpack from 'webpack;
In your tests:
import '@moped/env/test';
import * as webpack from 'webpack;
In development:
import '@moped/env/development';
import * as webpack from 'webpack;
If you want your users to specify NODE_ENV manually:
require('@moped/env/auto');
const webpack = require('webpack');
In your build file:
require('@moped/env/production');
const webpack = require('webpack');
In your tests:
require('@moped/env/test');
const webpack = require('webpack');
In development:
require('@moped/env/development');
const webpack = require('webpack');
Once you are using @moped/env, you can configure your environment using .env files. You should make sure the following is included in your .gitignore file:
.env.local
.env.development.local
.env.test.local
.env.production.local
When reading an environment variable, @moped/env will first look in the actual environment, then .env.{NODE_ENV}.local, then .env.{NODE_ENV}, then .env.local then .env. You use .env for config shared amongst all environments/for setting up a default config. You can use the .local variants for confidential configuration that you don't want published to GitHub, and you can use the {NODE_ENV} variants to override config in different environments.
You should always try to ensure your app at least runs with no .local config, as this will make it easier to onboard new team members.
MIT
FAQs
This module helps normalise your environment variables. It is part of the moped suite of utilities for creating composable configs for building node.js and react apps.
We found that @moped/env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Node.js patched a crash bug where AsyncLocalStorage could cause stack overflows to bypass error handlers and terminate production servers.

Research
/Security News
A malicious Chrome extension steals newly created MEXC API keys, exfiltrates them to Telegram, and enables full account takeover with trading and withdrawal rights.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.