Cannot proceed with update: You have local changes in app “hrms” that are not committed

Hi, everyone

So i already asked/view this question earlier.
I’m facing this issue everytime when i try to run bench update

I always get the same error which is : Cannot proceed with update: You have local changes in app “hrms” that are not committed.

And then i need to run these commands:- /frappe-bench/apps/hrms

git status
git reset --hard
git clean -f -d 
git stash

I want a permanent solution for this,
Thank You

Do git stash if you don’t care changes
Then proceed with bench update

As i mentioned i need to do this everytime after i restart my PC, and then it works.

@rs115199789 It works on me though.

1 Like

I have same issue.

I run these commands:- /frappe-bench/apps/hrms

git status
git reset --hard
git clean -f -d 
git stash

After do the bench update

Every thing is ok, but after reboot the same error for HRMS.

1 Like

Interesting if I
git stash in hrms folder the after it I can
bench update

If again I
bench update then NOT WORKING same hrms problem.

bench --site all list-apps

frappe 15.33.0 version-15
erpnext 15.29.0 version-15
payments 0.0.1 develop
hrms 15.23.0 version-15

bench --site all list-apps

frappe 15.33.0 version-15
erpnext 15.29.0 version-15
payments 0.0.1 develop
hrms 15.23.0 version-15

bench get-app hrms --resolve-deps
Following apps will be installed

  1. frappe/erpnext (required by hrms)
  2. hrms
    fatal: ref refs/remotes/upstream/HEAD is not a symbolic ref
    Incompatible version of erpnext is already installed
    ERROR: [Errno 2] No such file or directory: ‘./apps/frappe/erpnext/erpnext/init.py’

Incompatible version of erpnext???

What is happening?

Is your remote named upstream, or is it named origin for some reason?

@corentin

Thanks for the info!

How can I check if it is
origin
or
upstream?

How can I switch between the two?

Now that I think about it, maybe you are in the detached HEAD state?

git status will tell you, and git checkout version-15 might help you leave this state.


More info about your error message:

More info about remotes:

https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes

@corentin

I’m in upstream.

git status
On branch version-15
Your branch is up to date with ‘upstream/version-15’.

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git restore …” to discard changes in working directory)
modified: yarn.lock

no changes added to commit (use “git add” and/or “git commit -a”)

It seems ok, but I get this error.

/apps/hrms$ git branch -r
upstream/version-15

/apps/hrms$ git remote set-head origin master
error: Not a valid ref: refs/remotes/origin/master

/apps/hrms$ git checkout version-15
M yarn.lock
Already on ‘version-15’
Your branch is up to date with ‘upstream/version-15’.

Interesting if I
git stash in hrms folder then after it I can
bench update

If again I
bench update then NOT WORKING same hrms problem.

Okay this is the problem, when updating the application, JavaScript dependencies are retrieved using yarn, which means that the yarn.lock file is updated if dependencies are not correctly locked, which is the case here: this is a problem to fix.

Basically, you have to stash inside hrms before updating until the problem is fixed.

I opened a ticket for you here: yarn.lock outdated on branch version-15? · Issue #1947 · frappe/hrms · GitHub

1 Like

@flexy2ky any help brother ?
I’m using your script, and this came all of sudden.

Thank You

My script only handles installation not running so this is outside the scope of what my script could have caused or can resolve. However, this may be tied to a function/process within the hrms app that could be causing application level changes to occur.

You can first determine the actual changes that are occuring by checking the files that are changed, this could give you an idea of how this is happening so you can find a way to mitigate it. Beyond knowing what changes occur, I may be unable to give you any tips on how to resolve it.

Hi @flexy2ky
Thank you for your reply, I did try to check but i haven’t made any changes to HRMS app, what else shall i check .

Thank You

I didn’t suggest that you made the changes. What i am asking is for you to go to the app directory and run git status to see the files changed and possibly open the files to see the exact changes. This could give you an idea of what changes are being made to the app and why.

1 Like

Hi @flexy2ky

Here is the results after entering git status

darklord@Rahul-PC:~/frappe-bench$ cd apps
darklord@Rahul-PC:~/frappe-bench/apps$ cd hrms
darklord@Rahul-PC:~/frappe-bench/apps/hrms$ git status
On branch version-15
Your branch is up to date with 'upstream/version-15'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
  modified:   yarn.lock

no changes added to commit (use "git add" and/or "git commit -a")
 darklord@Rahul-PC:~/frappe-bench/apps/hrms$

Thank You

Issue resolved by running this command in hrms folder.

cd ~/frappe-bench/apps/hrms
git restore yarn.lock
2 Likes

I still hase several warning overwrite my hrms app:

.cache/yarn/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern [“wrap-ansi-cjs@npm:wrap-ansi@^7.0.0”]. This could result in non-deterministic behavior, skipping.
[3/4] Linking dependencies…
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > vite-plugin-pwa@0.19.8” has unmet peer dependency “workbox-build@^7.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > vite-plugin-pwa@0.19.8” has unmet peer dependency “workbox-window@^7.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-color@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-highlight@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-image@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-link@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-mention@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-placeholder@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-table@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-table-cell@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-table-header@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-table-row@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-text-align@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-text-style@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/extension-typography@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/suggestion@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/vue-3@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/vue-3 > @tiptap/extension-bubble-menu@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.
warning “workspace-aggregator-22fc29be-b83e-450e-922d-51a1d9015b3c > frappe-hr-ui > frappe-ui > @tiptap/vue-3 > @tiptap/extension-floating-menu@2.4.0” has unmet peer dependency “@tiptap/core@^2.0.0”.

How to solve it?