Local installation issue

Hi All,

try install it on VM with:

ubuntu 22.04 LTS
bench-frappe@vps-c6c53df8:~/bench-frappe/sites$ bench version
erpnext 15.70.2
frappe 15.74.1
payments 0.0.1

I try make new installation on new VM but get same error.


Deprecation Warning [legacy-js-api]: The legacy JS API is deprecated and will be removed in Dart Sass 2.0.0.

More info: Sass: Breaking Change: Legacy JS API

<— Last few GCs —>

[11234:0x350edeb0] 155927 ms: Mark-Compact 1419.1 (1457.2) → 1417.1 (1459.2) MB, 9592.01 / 0.00 ms (average mu = 0.398, current mu = 0.010) allocation failure; scavenge might not succeed
[11234:0x350edeb0] 162951 ms: Mark-Compact 1421.2 (1459.2) → 1418.8 (1460.7) MB, 6908.60 / 0.00 ms (average mu = 0.249, current mu = 0.016) allocation failure; scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

1: 0xb8cf03 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
2: 0xf060d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
3: 0xf063b7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
4: 0x1118005 [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
5: 0x112fe88 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
6: 0x1105fa1 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
7: 0x1107135 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
8: 0x10e4786 v8::internal::factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
9: 0x15402c6 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
10: 0x1979ef6 [/home/bench-frappe/.nvm/versions/node/v20.19.4/bin/node]
Aborted (core dumped)
error Command failed with exit code 134.
info Visit yarn run | Yarn for documentation about this command.
error Command failed with exit code 134.
info Visit yarn run | Yarn for documentation about this command.
Error: Command failed: yarn build
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at execSync (node:child_process:963:15)
at run_build_command_for_apps (/home/bench-frappe/bench-frappe/apps/frappe/esbuild/esbuild.js:448:5)
at execute (/home/bench-frappe/bench-frappe/apps/frappe/esbuild/esbuild.js:125:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 134,
signal: null,
output: [ null, null, null ],
pid: 11209,
stdout: null,
stderr: null
}
error Command failed with exit code 1.
info Visit yarn run | Yarn for documentation about this command.
Traceback (most recent call last):
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/bench-frappe/bench-frappe/apps/frappe/frappe/utils/bench_helper.py”, line 114, in
main()
File “/home/bench-frappe/bench-frappe/apps/frappe/frappe/utils/bench_helper.py”, line 20, in main
click.Group(commands=commands)(prog_name=“bench”)
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 1442, in call
return self.main(*args, **kwargs)
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 1363, in main
rv = self.invoke(ctx)
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 1830, in invoke
return process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/bench-frappe/bench-frappe/env/lib/python3.10/site-packages/click/core.py”, line 794, in invoke
return callback(*args, **kwargs)
File “/home/bench-frappe/bench-frappe/apps/frappe/frappe/commands/utils.py”, line 77, in build
bundle(
File “/home/bench-frappe/bench-frappe/apps/frappe/frappe/build.py”, line 255, in bundle
frappe.commands.popen(command, cwd=frappe_app_path, env=get_node_env(), raise_err=True)
File “/home/bench-frappe/bench-frappe/apps/frappe/frappe/commands/init.py”, line 97, in popen
raise subprocess.CalledProcessError(return
, command)
subprocess.CalledProcessError: Command ‘yarn run production --apps insights --run-build-command’ returned non-zero exit status 1.
ERROR: bench build --app insights
subprocess.CalledProcessError: Command ‘bench build --app insights’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/bench/commands/make.py”, line 181, in get_app
get_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 781, in get_app
app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/render.py”, line 126, in wrapper_fn
return fn(*args, **kwargs)
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 253, in install
install_app(
File “/usr/local/lib/python3.10/dist-packages/bench/app.py”, line 948, in install_app
build_assets(bench_path=bench_path, app=app, using_cached=using_cached)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/bench.py”, line 404, in build_assets
exec_cmd(command, cwd=bench_path, env=env)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 184, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: bench build --app insights

Hi,

How much memory does the VM have allocated to it?

1 Like

Increase or Add swap space. You don’t have enough ram.

thanks @smino ans @mitexleo

I added more swap memori, but now stop with error “node”.
Do you have any idea what happened?

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.profile
nvm install 20

and

npm install npm@latest

when I checked version see this, but get same error.

root@vps-c6c53df8:/home/bench-frappe/bench-frappe# npm list --depth=0
bench-frappe@ /home/bench-frappe/bench-frappe
├── node-sass@9.0.0
└── npm@11.4.2

root@vps-c6c53df8:/home/bench-frappe/bench-frappe# node -v
v20.19.4
root@vps-c6c53df8:/home/bench-frappe/bench-frappe#

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

INFO: App moved from apps/insights to archived/apps/insights-2025-07-20_2
Getting insights
$ git clone https://github.com/frappe/insights.git --branch develop --depth 1 --origin upstream
Cloning into 'insights'...
remote: Enumerating objects: 1002, done.
remote: Counting objects: 100% (1002/1002), done.
remote: Compressing objects: 100% (928/928), done.
remote: Total 1002 (delta 152), reused 482 (delta 64), pack-reused 0 (from 0)
Receiving objects: 100% (1002/1002), 24.15 MiB | 10.80 MiB/s, done.
Resolving deltas: 100% (152/152), done.
Ignoring dependencies of insights. To install dependencies use --resolve-deps
Installing insights
$ /home/bench-frappe/bench-frappe/env/bin/python -m pip install --quiet --upgrade -e /home/bench-frappe/bench-frappe/apps/insights
$ yarn install --check-files
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/home/bench-frappe/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
error insights-frontend@0.0.0: The engine "node" is incompatible with this module. Expected version ">=18.17.0". Got "12.22.9"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
ERROR: yarn install --check-files
subprocess.CalledProcessError: Command 'yarn install --check-files' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.10/dist-packages/bench/cli.py", line 132, in cli
    bench_command()
  File "/usr/local/lib/python3.10/dist-packages/bench/commands/make.py", line 181, in get_app
    get_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 781, in get_app
    app.install(verbose=verbose, skip_assets=skip_assets, restart_bench=restart_bench)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/render.py", line 126, in wrapper_fn
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 253, in install
    install_app(
  File "/usr/local/lib/python3.10/dist-packages/bench/app.py", line 943, in install_app
    bench.run(yarn_install, cwd=app_path)
  File "/usr/local/lib/python3.10/dist-packages/bench/bench.py", line 49, in run
    return exec_cmd(cmd, cwd=cwd or self.cwd, _raise=_raise, env=env)
  File "/usr/local/lib/python3.10/dist-packages/bench/utils/__init__.py", line 184, in exec_cmd
    raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: yarn install --check-files

PD:_

*************************** past *******************************

System information as of Sun Jul 20 20:22:11 UTC 2025

System load: 0.46
Usage of /: 66.0% of 19.20GB
Memory usage: 27%
Swap usage: 34%
Processes: 115

ubuntu@vps-c6c53df8:~$ free -h
total used free shared buff/cache available
Mem: 1.9Gi 482Mi 394Mi 0.0Ki 1.0Gi 1.2Gi
Swap: 2.0Gi 702Mi 1.3Gi

+++++++++++++++++++++++ new ++++++++++++++++++++++

ubuntu@vps-c6c53df8:~$ free -h
total used free shared buff/cache available
Mem: 1.9Gi 513Mi 903Mi 1.0Mi 499Mi 1.2Gi
Swap: 5.0Gi 0B 5.0Gi

Memory is still insufficient to run Frappe comfortably, 4G is recommended , 8 for production.

What does which node or node -v return when run as the non-root user?

Hi @smino,

this is my version of node, I install last version too and same problem.

User

ubuntu@vps-c6c53df8:/home/bench-frappe/bench-frappe$ node -v
v20.19.4

Root

root@vps-c6c53df8:/home/bench-frappe/bench-frappe# node -v
v20.19.4

add 8 GB of swap for check if it the problem

root@vps-c6c53df8:/home/bench-frappe/bench-frappe# free -h
               total        used        free      shared  buff/cache   available
Mem:           1.9Gi       784Mi       105Mi       1.0Mi       1.0Gi       940Mi
Swap:          8.0Gi        18Mi       8.0Gi

Does yarn --check-files return the same message as the script?

give this log on directory of insights

root@vps-c6c53df8:/home/bench-frappe/bench-frappe/apps/insights# yarn install --check-files
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/usr/local/share/.cache/yarn/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
[3/4] Linking dependencies...
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/suggestion@2.12.0" has unmet peer dependency "@tiptap/core@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/suggestion@2.12.0" has unmet peer dependency "@tiptap/pm@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3@2.12.0" has unmet peer dependency "@tiptap/core@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3@2.12.0" has unmet peer dependency "@tiptap/pm@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > thememirror@2.0.1" has unmet peer dependency "@codemirror/language@^6.0.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > thememirror@2.0.1" has unmet peer dependency "@codemirror/state@^6.0.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > thememirror@2.0.1" has unmet peer dependency "@codemirror/view@^6.0.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3 > @tiptap/extension-bubble-menu@2.12.0" has unmet peer dependency "@tiptap/core@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3 > @tiptap/extension-bubble-menu@2.12.0" has unmet peer dependency "@tiptap/pm@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3 > @tiptap/extension-floating-menu@2.12.0" has unmet peer dependency "@tiptap/core@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > @tiptap/vue-3 > @tiptap/extension-floating-menu@2.12.0" has unmet peer dependency "@tiptap/pm@^2.7.0".
warning "workspace-aggregator-0f662bb8-e78e-4a45-aba4-a6878ccfd0da > insights-frontend > frappe-ui > @tiptap/extension-code-block-lowlight@2.12.0" has unmet peer dependency "highlight.js@^11".
warning Workspaces can only be enabled in private projects.
[4/4] Building fresh packages...
success Saved lockfile.
$ cd frontend && yarn install --check-files
yarn install v1.22.22
[1/4] Resolving packages...
success Already up-to-date.
Done in 6.06s.
Done in 45.52s.
root@vps-c6c53df8:/home/bench-frappe/bench-frappe/apps/insights#

when check with bench version I dont see the app install

erpnext 15.70.2
frappe 15.74.1
frappe_whatsapp 1.0.7
payments 0.0.1
root@vps-c6c53df8:/home/bench-frappe/bench-frappe#