Vuejs - npm version patch - git working directory not clean

Viewed 1870

I followed along a guide to learn about how to publish packages to NpmJS. But when I updated the README.MD and try to update the package on NpmJS I get the following error:

npm version patch
npm ERR! Git working directory not clean.
npm ERR! A  .gitignore
npm ERR! AM README.md
npm ERR! A  babel.config.js
npm ERR! AM package-lock.json
npm ERR! AM package.json
npm ERR! AD public/favicon.ico
npm ERR! AD public/index.html
npm ERR! AD src/App.vue
npm ERR! AD src/assets/logo.png
npm ERR! AD src/components/HelloWorld.vue
npm ERR! AD src/main.js

And what I dont understand is that there is no HelloWorld.vue in my package. I haven't even used git for this, only npm.

Can someone point me in the right direction on this?

1 Answers

You should commit the changes then patch the version :

git add .
git commit -m "publish to npm"
npm version patch
Related