---
title: "Comment by Sujit Daswant on \"Package SPFx solution with one command and automatically increase the version\" | Hashnode"
description: "Hi Sergej Schwabauer, I am really appreciate for this blog, this is helped me lot for Auto increment the the version number. But I am facing issue with the abov"
url: "https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e"
---

[Discussion](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540)

Comment [Package SPFx solution with one command and automatically increase the version](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540)

[Sujit Daswant](https://hashnode.com/@Sujit88Daswant)

[Sep 16, 2022](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e)

Hi Sergej Schwabauer, I am really appreciate for this blog, this is helped me lot for Auto increment the the version number.

But I am facing issue with the above, when I am trying to run the command for npm run publish -- --no-patch,npm run publish -- --major,npm run publish -- --minor version always the minor version get updated even for no patch also.

Please let me know how to fix this.

[$€®¥09@](https://hashnode.com/@Seryoga)

[Sep 16, 2022](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e#reply-63245a78dd55cd8b89b1c2bd)

Hi [Sujit Daswant](https://hashnode.com/@Sujit88Daswant) Thank you for your comment. I don't know what the problem could be. Could you tell what the output window is showing you? Any comments from my command? Is minor version incremented in both json files (package.json and package-solution.json)? Have you tried the gulp command instead of npm run? I mean `gulp bump-version` or `gulp bump-version --major`?

[Sujit Daswant](https://hashnode.com/@Sujit88Daswant)

[Sep 19, 2022](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e#reply-632848bd99624fc71cd5161f)

[$€®¥09@](https://hashnode.com/@Seryoga) , Thanks for quick response. As per mentioned in comment I have tried to run the command and its working fine. version is getting updated as expected.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1663584321596/PDgumGoPT.png)

I think the issue is with this command, npm run publish -- --no-patch npm run publish -- --major npm run publish -- --minor

I have followed the steps as per mentioned in this blog.

[$€®¥09@](https://hashnode.com/@Seryoga)

[Sep 19, 2022](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e#reply-63288b98195e7dc741da5e32)

[Sujit Daswant](https://hashnode.com/@Sujit88Daswant) Okay, I understand. And now I know what you mean and what the problem is. The `npm run` command with the additional arguments is only added to the "last" command (in our case ==> `gulp package solution` command). But we need this argument in the `gulp bundle` command. Thanks for your hint. To fix it, you need to create a post-script and modify the "publish" script:

```
"publish": "gulp clean && gulp build && gulp bundle --ship",
"postpublish": "gulp package-solution --ship"
```

Thanks again and I have already changed it in the post above.

[Sujit Daswant](https://hashnode.com/@Sujit88Daswant)

[Sep 20, 2022](https://hashnode.com/posts/package-spfx-solution-with-one-command-and-automatically-increase-the-version/62ac542a2b2b09182b658540/comment/63244665dd55cd8b89b1be7e#reply-632986fd195e7dc741da7ac9)

[$€®¥09@](https://hashnode.com/@Seryoga) ,

I am really appreciate your solution. The solution which you have provided is worked for me and also seen the updated changed in the blog.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1663665849506/NfegjPetm.png)

Now the Auto Version are updating as per expectation.

Keep posting your valuable experience with us.

Happy Coding ;-)
