Yesterday I updated my erpnext. After little issues with psutil, vue, and node-sass now all seems to work fine:
bench --version
5.4.1
bench version
erpnext 13.7.0
frappe 13.7.0
The only thing I can no longer use is the POS. Something seems to be wrong with the js/css files.
Although ‘bench build’ was executed without errors. I also tried to clear cache and website-cache and opened the POS on different Browsers, different machines and operating systems.
My initial Version was [13.0.0-beta.9]. Maybe a patch between beta9 and 13.7.0 is missing.
I have a little local retail store and the POS is nearly unusable like this.
Try below commands, one at a time, I mean run the first, to completion, then the next and so on. You can remove the –no-backup I normally use it to skip lengthy backups.
$ cd apps/frappe
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.5.0" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.5.0" has unmet peer dependency "popper.js@^1.16.0".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
[1/4] ⠠ node-sass
[-/4] ⠠ waiting...
[-/4] ⠠ waiting...
error /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-sass: Command failed.
Exit code: 1
Command: node scripts/build.js
Arguments:
Directory: /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-sass
Output:
Building: /usr/bin/node /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli '/usr/bin/node',
gyp verb cli '/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@16.5.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:13:12)
gyp verb `which` failed at F (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:68:19)
gyp verb `which` failed at E (/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:80:29)
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/which/which.js:89:16
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/isexe/index.js:42:5
gyp verb `which` failed at /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/isexe/mode.js:8:5
gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:195:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python /disk/service/web/home/erp/bin/python
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /disk/service/web/home/erp/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (node:child_process:397:12)
gyp ERR! stack at ChildProcess.emit (node:events:394:28)
gyp ERR! stack at maybeClose (node:internal/child_process:1067:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
gyp ERR! System Linux 5.12.15-arch1-1
gyp ERR! command "/usr/bin/node" "/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/node-sass
gyp ERR! node -v v16.5.0
gyp ERR! node-gyp -v v3.8.0
It has the same error. The error message is not really revealing if you dont have written the code yourself.
I dont understand whats the problem. All these files are available:
/usr/bin/node
apps/frappe/node_modules/node-sass
apps/frappe/node_modules/node-gyp/bin/node-gyp.js
apps/frappe/node_modules/node-sass/scripts/build.js
Is it really necessary to install python2 ???
Or is it version of node and node-gyp a problem:
gyp ERR! node -v v16.5.0
gyp ERR! node-gyp -v v3.8.0
Hi, I would recommend you to downgrade node to v14. Try. If it still not work, remove modified filed (ps: kindly backup if you’ve modified any file) from frappe & erpnext app even node_modules & yarn.lock, pull latest changes from version-13 branch. Again try to update & build using:
I tried to downgrade nodejs. The latest possible version is nodejs-15.14 because of depencies to icu 69.
It is not possible to downgrade to earlier versions. I set up the server on 27.01.2021. I dont think earlier versions are necessary and erpnext was running since that time.
For now the errors at ‘bench build’ are gone but there is the same problem with POS as shown in my first post.
Now there are errors in ‘bench setup requirements’:
Installing applications...
$ ./env/bin/python -m pip install -q -U pip
Installing frappe
$ ./env/bin/python -m pip install -q -U -e ./apps/frappe
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > bootstrap@4.5.0" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.5.0" has unmet peer dependency "popper.js@^1.16.0".
warning Workspaces can only be enabled in private projects.
error An unexpected error occurred: "EACCES: permission denied, unlink '/disk/service/web/home/erp/frappe-bench/apps/frappe/node_modules/.bin/acorn'".
info If you think this is a bug, please open a bug report with the information provided in "/disk/service/web/home/erp/frappe-bench/apps/frappe/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Installing erpnext
$ ./env/bin/python -m pip install -q -U -e ./apps/erpnext
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.
error An unexpected error occurred: "EACCES: permission denied, copyfile '/srv/http/.cache/yarn/v6/npm-ansi-regex-5.0.0-integrity/node_modules/ansi-regex/index.d.ts' -> '/disk/service/web/home/erp/frappe-bench/apps/erpnex
t/node_modules/@snyk/fix/node_modules/ansi-regex/index.d.ts'".
info If you think this is a bug, please open a bug report with the information provided in "/disk/service/web/home/erp/frappe-bench/apps/erpnext/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Installing posawesome
$ ./env/bin/python -m pip install -q -U -e ./apps/posawesome
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.14s.
$ bench update --requirements --no-backup
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
Von https://github.com/frappe/frappe
* branch version-13 -> FETCH_HEAD
Setting up requirements...
Installing applications...
$ /disk/service/web/home/erp/frappe-bench/env/bin/python -m pip install -q -U pip
Installing frappe
$ /disk/service/web/home/erp/frappe-bench/env/bin/python -m pip install -q -U -e /disk/service/web/home/erp/frappe-bench/apps/frappe
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
$ yarn run snyk-protect
yarn run v1.22.10
warning ../../package.json: No license field
$ snyk protect
Successfully applied Snyk patches
Done in 8.33s.
Done in 9.52s.
Installing erpnext
$ /disk/service/web/home/erp/frappe-bench/env/bin/python -m pip install -q -U -e /disk/service/web/home/erp/frappe-bench/apps/erpnext
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsiste
ncies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.
error An unexpected error occurred: "EACCES: permission denied, unlink '/disk/service/web/home/erp/frappe-bench/apps/erpnext/node_modules/@snyk/inquirer/node_modules/ansi-regex/index.
d.ts'".
info If you think this is a bug, please open a bug report with the information provided in "/disk/service/web/home/erp/frappe-bench/apps/erpnext/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Installing posawesome
$ /disk/service/web/home/erp/frappe-bench/env/bin/python -m pip install -q -U -e /disk/service/web/home/erp/frappe-bench/apps/posawesome
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.12s.
Updating node packages...
Installing node dependencies for erpnext
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsiste
ncies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning Workspaces can only be enabled in private projects.
error An unexpected error occurred: "EACCES: permission denied, unlink '/disk/service/web/home/erp/frappe-bench/apps/erpnext/node_modules/@snyk/inquirer/node_modules/ansi-regex/index.
d.ts'".
info If you think this is a bug, please open a bug report with the information provided in "/disk/service/web/home/erp/frappe-bench/apps/erpnext/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Installing node dependencies for POS-Awesome
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.13s.
Installing node dependencies for frappe
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
$ yarn run snyk-protect
yarn run v1.22.10
warning ../../package.json: No license field
$ snyk protect
Successfully applied Snyk patches
Done in 6.42s.
Done in 7.83s.
Installing node dependencies for posawesome
$ yarn install
yarn install v1.22.10
warning ../../package.json: No license field
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.12s.
$ sudo systemctl stop -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
$ sudo systemctl start -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
________________________________________________________________________________
Bench: Deployment tool for Frappe and Frappe Applications (https://frappe.io/bench).
Open source depends on your contributions, so do give back by submitting bug reports, patches and fixes and be a part of the community :)
$ bench switch-to-branch version-13 frappe erpnext --upgrade
$ bench update --patch --no-backup
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
Von https://github.com/frappe/frappe
* branch version-13 -> FETCH_HEAD
Patching sites...
Migrating riwollis-box.tcp4.me
Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [========================================] 100%
Updating DocTypes for posawesome : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating Dashboard for posawesome
Updating customizations for Address
Updating customizations for Contact
Building search index for riwollis-box.tcp4.me
Retrieving Routes : [========================================] 100%
Building Index : [========================================] 100%Migrating riwollis-shop.tcp4.me
Updating DocTypes for frappe : [========================================] 100%
Updating DocTypes for erpnext : [========================================] 100%
Updating Dashboard for frappe
Updating Dashboard for erpnext
Updating customizations for Address
Updating customizations for Contact
Building search index for riwollis-shop.tcp4.me
Retrieving Routes : [========================================] 100%
Building Index : [========================================] 100%
$ sudo systemctl stop -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
$ sudo systemctl start -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
________________________________________________________________________________
Bench: Deployment tool for Frappe and Frappe Applications (https://frappe.io/bench).
Open source depends on your contributions, so do give back by submitting bug reports, patches and fixes and be a part of the community :)
$ bench update --build --no-backup
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
Von https://github.com/frappe/frappe
* branch version-13 -> FETCH_HEAD
Building assets...
$ bench build
Retrieving assets...
✔ Downloaded Frappe assets from https://github.com/frappe/frappe/releases/download/v13.7.0/assets.tar.gz
Extracting assets...
✔ Restored js/control.min.js.map
✔ Restored js/web_form.min.js.map
✔ Restored js/moment-bundle.min.js
✔ Restored js/control.min.js
✔ Restored js/desk.min.js
✔ Restored js/desk.min.js.map
✔ Restored js/checkout.min.js
✔ Restored js/bootstrap-4-web.min.js.map
✔ Restored js/data_import_tools.min.js.map
✔ Restored js/chat.js.map
✔ Restored js/list.min.js
✔ Restored js/list.min.js.map
✔ Restored js/bootstrap-4-web.min.js
✔ Restored js/data_import_tools.min.js
✔ Restored js/barcode_scanner.min.js
✔ Restored js/dialog.min.js.map
✔ Restored js/chat.js
✔ Restored js/barcode_scanner.min.js.map
✔ Restored js/report.min.js.map
✔ Restored js/frappe-recorder.min.js.map
✔ Restored js/form.min.js
✔ Restored js/dialog.min.js
✔ Restored js/web_form.min.js
✔ Restored js/frappe-web.min.js
✔ Restored js/frappe-recorder.min.js
✔ Restored js/libs.min.js
✔ Restored js/report.min.js
✔ Restored js/form.min.js.map
✔ Restored js/checkout.min.js.map
✔ Restored js/user_profile_controller.min.js.map
✔ Restored js/frappe-web.min.js.map
✔ Restored js/user_profile_controller.min.js
✔ Restored css/rollup.manifest.css
✔ Restored css/email.css
✔ Restored css/report.min.css
✔ Restored css/frappe-web-b4.css
✔ Restored css/desk.min.css
✔ Restored css/frappe-rtl.css
✔ Restored css/printview.css
✔ Restored css/frappe-chat-web.css
✔ Restored css/web_form.css
✔ Restored css/login.css
✔ Application Assets Linked
yarn run v1.22.10
warning ../../package.json: No license field
$ FRAPPE_ENV=production node rollup/build.js --skip_frappe
Production mode
✔ Built js/moment-bundle.min.js
✔ Built js/libs.min.js
Building erpnext assets...
✔ Built js/erpnext-web.min.js
✔ Built js/bank-reconciliation-tool.min.js
✔ Built js/item-dashboard.min.js
✔ Built js/erpnext.min.js
✔ Built js/point-of-sale.min.js
✔ Built css/erpnext-web.css
✔ Built css/erpnext.css
✔ Built css/marketplace.css
✔ Built js/marketplace.min.js
✨ Done in 20.995s
Building posawesome assets...
✔ Built js/toConsole.min.js
✔ Built js/posapp.min.js
✨ Done in 10.436s
Done in 39.81s.
$ sudo systemctl stop -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
$ sudo systemctl start -- $(systemctl show -p Requires frappe-bench.target | cut -d= -f2)
________________________________________________________________________________
Bench: Deployment tool for Frappe and Frappe Applications (https://frappe.io/bench).
Open source depends on your contributions, so do give back by submitting bug reports, patches and fixes and be a part of the community :)
Thanks everyone for listening and to @glz and @asharamseervi for the hints. I hope this also helps others.