You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tslib is in devDependencies → Cannot find module 'tslib' on global install #2629
@contentstack/clirequire("tslib") at runtime (e.g. lib/help.js) but lists tslib in devDependencies, not dependencies. Consumers don't get devDependencies, so tslib is never
installed and the CLI errors out on install.
Repro:
pnpm add -g @contentstack/cli
csdx --help
→ ends with [MODULE_NOT_FOUND] ... @contentstack/cli/lib/help.js: Cannot find module 'tslib'.
You don't hit it in dev because .npmrc has shamefully-hoist=true, which hoists tslib into a
resolvable spot — but that's not published, so it doesn't help users. npm users also mostly dodge
it via flat node_modules. Not OS-specific.
Fix: move tslib to dependencies in packages/contentstack/package.json (or set importHelpers: false in tsconfig so no runtime tslib is needed). Worth checking the other packages/* plugins for the same misplacement.
Note: a global install also throws a larger wall of tslib errors from the @contentstack/cli-launch
plugin — that's a separate package (contentstack/launch-cli) with the same bug; filed there too.
It moves tslib from devDependencies to runtime dependencies for @contentstack/cli, which matches the package's importHelpers: true TypeScript output and should prevent Cannot find module 'tslib' after installs that omit devDependencies.
Activity
goodguypeci-design commentedon Sep 8, 2026
I opened a focused PR for this: #2721
It moves
tslibfrom devDependencies to runtime dependencies for@contentstack/cli, which matches the package'simportHelpers: trueTypeScript output and should preventCannot find module 'tslib'after installs that omit devDependencies.