2

I got npm timeout error so I followed this answer. When I run pnpm publish --otp=111111, I got this error :

 ERROR  Unclean working tree. Commit or stash changes first.

What means this error ? How can I fix this ?

J.BizMai
  • 2,621
  • 3
  • 25
  • 49

1 Answers1

2

pnpm from v5 will not allow you to make a publish if you have changes in the repository that are not committed.

If you still want to publish, you may use the --no-git-checks option. For example, pnpm publish --no-git-checks. Or you can create a .npmrc file in the root of your project and set it permanently: git-checks=false.

These are all the git checks that are performed by pnpm, when git-checks is true:

  • current branch is your publish branch (master by default)
  • repository is clean
  • repositroy is up-to-date.
Zoltan Kochan
  • 5,180
  • 29
  • 38