canirequire › No JS entry point › tsup
Is tsup ESM-only? Can you require() it?
Bundle your TypeScript library with no config, powered by esbuild
Last verified Sep 9, 2026 against tsup@8.5.1. JSON
No JS entry point No JavaScript entry point
tsup does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.
Does tsup@8.5.1 actually load? Runtime test results
Installed and executed on Sep 9, 2026 with require("tsup") from a CommonJS file and import "tsup" from an ES module.
| Runtime | require("tsup") | import "tsup" |
|---|---|---|
| Node.js 18 | ✗ failsMODULE_NOT_FOUND | ✗ failsMODULE_NOT_FOUND |
| Node.js 20 | ✗ failsMODULE_NOT_FOUND | ✗ failsMODULE_NOT_FOUND |
| Node.js 22 | ✗ failsMODULE_NOT_FOUND | ✗ failsMODULE_NOT_FOUND |
| Node.js 24 | ✗ failsMODULE_NOT_FOUND | ✗ failsMODULE_NOT_FOUND |
| Node.js 26 | ✗ failsMODULE_NOT_FOUND | ✗ failsMODULE_NOT_FOUND |
| Bun 1.4 | ✗ failserror: Cannot find package 'typescript' from '/Users/boat/Projects/top-seo/data/probe-work/tsup/node_modules/tsup/dist/index.js' | ✗ failserror: Cannot find package 'typescript' from '/Users/boat/Projects/top-seo/data/probe-work/tsup/node_modules/tsup/dist/index.js' |
A failing require() on a CommonJS package usually means the package needs a browser/DOM global, a peer dependency, or a native binary that is not available in a bare Node.js process.
How to import tsup
ES modules (import)
import tsup from "tsup";CommonJS (require)
Not applicable.
Module format by version
Derived from the type, main and exports fields of every stable release on npm (204 versions; the newest 60 shown).
| Versions | Format | First published |
|---|---|---|
| 5.11.4 – 8.5.1 | CommonJS | Dec 14, 2021 |
Frequently asked
Is tsup ESM-only?
tsup@8.5.1 has no importable main entry. tsup does not expose a JavaScript entry point in package.json. It is likely a CLI, a stylesheet, a type-definition package, or an asset bundle, so require() and import are not the way to use it.
Does tsup work in Bun?
Importing tsup failed in Bun 1.4 on Sep 9, 2026: error: Cannot find package 'typescript' from '/Users/boat/Projects/top-seo/data/probe-work/tsup/node_modules/tsup/dist/index.js'
Does tsup ship TypeScript types?
Yes. tsup bundles its own type declarations; no @types package is needed.
Links
Other no js entry point packages
- type-fest 5.9.0No entry
- eslint-config-next 16.3.4No entry
- storybook 10.6.0No entry
- @storybook/addon-docs 10.6.0No entry
- @storybook/addon-a11y 10.6.0No entry
- eslint-plugin-storybook 10.6.0No entry
- typedoc 0.28.20No entry
- normalize.css 8.0.1No entry
Similar popularity
- react-select 5.10.2Dual
- mongoose 9.9.5CommonJS
- ncp 2.0.0CommonJS
- electron 44.3.0CommonJS
- vue-router 5.3.1Dual
- lit-element 4.2.2ESM-only
- eslint-plugin-jsdoc 64.3.8ESM-only
- bootstrap 5.3.8CommonJS