Socket
Book a DemoInstallSign in
Socket

create-diagnose

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-diagnose

Debug npm `create` commands (well, understand them)

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

create-diagnose

Helped me debug/understand how npm create worked, and align behavior across pnpm/yarn/npm etc. Probably not useful to you unless you're creating a create-* module.

Usage

npm create diagnose

# do some guesses as to what package manager and create command you likely wanted to use
npm create -- --guess

Findings

npm

  • npm create diagnose@latest --some-npm-flag -- --non-npm-flag
    • Only flags after -- gets passed to create-diagnose command (expected)
    • process.env.npm_command: init (alias of create)
    • process.env.npm_lifecycle_event: npx
    • process.env.npm_lifecycle_script: create-diagnose

pnpm

  • pnpm create diagnose@latest --some-npm-flag -- --non-npm-flag
    • All flags are passed, even the ones before --
    • process.env.npm_config_user_agent: (eg) pnpm/10.7.1 npm/? node/v22.14.0 darwin arm64

yarn v1

  • yarn create diagnose@latest --some-npm-flag -- --non-npm-flag
    • Fails: […].yarn/bin/create-diagnose@latest: No such file or directory
  • yarn create diagnose --non-npm-flag
    • process.env.npm_config_user_agent: (eg) yarn/1.22.22 npm/? node/v22.14.0 darwin arm64

bun

  • bun create diagnose@latest --some-npm-flag -- --non-npm-flag
    • All flags are passed, even the ones before --
    • process.env.npm_config_user_agent (eg) bun/1.2.12 npm/? node/v22.6.0 darwin arm64
    • process.env.npm_command: exec
    • process.env.npm_lifecycle_event: bunx
    • process.env.npm_lifecycle_script: create-diagnose@latest

License

MIT-licensed. See LICENSE.

Keywords

npm

FAQs

Package last updated on 02 Jul 2025

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