🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@rzl-zone/node-only

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rzl-zone/node-only

Marker package to restrict imports to Node.js and server-only environments.

latest
Source
npmnpm
Version
0.0.11
Version published
Weekly downloads
39
-15.22%
Maintainers
1
Weekly downloads
 
Created
Source

Node Only

Marker package to restrict imports to Node.js or server-only environments.

Helps prevent client-side usage of server modules and improves boundary safety for React Server Components, TypeScript, and JavaScript projects.

Example usage

import "@rzl-zone/node-only";

import fs from "node:fs";

export function readConfig() {
  return fs.readFileSync("./config.json", "utf-8");
}

If this module is imported inside a client-side environment, it will throw an error and prevent accidental usage.

Read More Documentation

Keywords

rsc

FAQs

Package last updated on 24 May 2026

Did you know?

Socket

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.

Install

Related posts