server-only
npmv0.0.1This is a marker package to indicate that a module can only be used in Server Components.
Overview
server-only is an npm package that this is a marker package to indicate that a module can only be used in Server Components. It is extremely widely used, with about 11.6M downloads per week and 1 known dependents in the graph. The latest version is 0.0.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need this is a marker package to indicate that a module can only be used in Server Components and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (11.6M weekly downloads).
- Clear open-source license (MIT).
- Zero runtime dependencies — minimal footprint.
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of server-only.
Used by
Popular packages that depend on server-only.
Alternatives to server-only
Brand checking of React Elements.
Cooperative scheduler for the browser environment.
Next.js dotenv file loading
A framework for building native apps using React
A library for interacting with the app.json
React hook which returns the latest callback without changing the reference
React Freeze
More powerful alternative to Animated library for React Native.
DevTools plugin helpers for Expo
The React Native multithreading library
React Native for Web
React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.
Frequently installed together
Native navigation primitives for your React Native app.
The Expo SDK
More powerful alternative to Animated library for React Native.
Declarative API exposing native platform touch and gesture system to React Native
Tools for making advanced Metro bundler features work
React Native for Web
Error overlay for universal Expo apps.
React Server Components bindings for DOM using Webpack. This is intended to be integrated into meta-frameworks. It is not intended to be imported directly.
Simple and complete React Native testing utilities that encourage good testing practices.
Lightweight debugging utility for Node.js and the browser
TypeScript definitions for node
Brand checking of React Elements.
Version history
| Version | Published | License |
|---|---|---|
| 0.0.1latest | 3 years ago | MIT |
Maintainers
Keywords
Frequently asked questions
How do I install server-only?
Run `npm install server-only` to add server-only to your npm project.
What license is server-only released under?
server-only is distributed under the MIT license.
How popular is server-only?
server-only has approximately 11,568,264 downloads per week and 1 known dependent packages.