Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: use npx vs. npm exec #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

blimmer
Copy link

@blimmer blimmer commented Feb 25, 2021

npm exec is new with NPM 7, so it errors with NPM 6. npx will work with npm 6 and 7.

# Use npm exec, since pnpm doesn't yet support exec
npm exec -- github:typicode/husky-4-to-5 --package-manager pnpm
# Use npx, since pnpm doesn't yet support exec
npx -- github:typicode/husky-4-to-5 --package-manager pnpm
Copy link

@yoyo837 yoyo837 Mar 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will add "undefined": "^0.1.0" in package.json devDependencies run with yarn

@bennycode
Copy link

It looks like npm exec is only available with Node.js 15+. With Node.js 14 you have to rely on npx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants