pnpm: --no-install is not in the npm registry

pnpm version: 7.0.0-rc.2

Code to reproduce the issue:

commit git, there is a pnpm error,why??????The two are completely unrelated

ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/--no-install: Not Found - 404
--no-install is not in the npm registry, or you have no permission to fetch it.

image

Expected behavior:

Actual behavior:

Additional information:

  • node -v prints: v14.19.0
  • Windows11

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 21 (3 by maintainers)

Most upvoted comments

For pnpm husky install & npx husky install failed users, pnpm dlx husky install works well.

Thanks , pnpm dlx husky install works for me.

For pnpm husky install & npx husky install failed users, pnpm dlx husky install works well.

You need to update husky to the latest version and maybe run pnpm husky install. Maybe your hooks were created by an older version of husky.

That probably is a husky issue. I don’t know what version of husky you are using, but I guess it is 4? Husky 4 seems not to support pnpm that well, and I also ran into this issue yesterday. You can bypass this problem by using --no-verify when committing. To resolve this you should refer to this article and migrate your husky to 8, then use new .husky to hook your git.

I solved by downgrading version of pnpm from 7.3.0 to 6.32.23

You need to update husky to the latest version and maybe run pnpm husky install. Maybe your hooks were created by an older version of husky.

Hi, I solved this problem by using pnpm husky install. I would like to ask what pnpm <pkg> install does and how it differs from npm install <pkg> or pnpm add <pkg>

image this question

Has anyone got a fix for this using the latest version of pnpm?

You have some githook that runs pnpm.

I am using pnpm dlx with pnpm v7.8.0 and husky v8.0.1 and yet I have the same error. Is there any progress on this? Thanks you very much! 🙏

@YunYouJun In some cases pnpm script-name is identical to pnpm run script-name only for scripts that do not share the same name as already existing pnpm commands according to documentation. In addtion, pnpm executable like pnpm eslint is the same as node ./node_modules/eslint/bin/eslint.js when installing eslint as devDependencies or dependencies.