Description of the issue
in a version-15 setup, when creating a website theme, it produces the error below:
FileNotFoundError: [Errno 2] No such file or directory: 'node'
as seen in this image:
then i tried to follow the stacktrace, I landed in apps/frappe/frappe/website/doctype/website_theme/website_theme.py
my assumptions are that the node executable is not loaded in the environment, so i did some quick edit to print the env to frappe throw:
and i get this:
since i install node using nvm, the nvm path is not present inside the env.
but then i tried to run in bench console, the env is loaded correctly:
even bench execute returns the same results
is something wrong somewhere?
Context information (for bug reports)
Output of bench version
5.23.0
Steps to reproduce the issue
- install a clean version-15 bench
- create a new site
- login to new site, go to website themes, new theme
- put a random name
- save theme
Observed result
Expected result
Success
Stacktrace / full error message
Traceback (most recent call last):
File "apps/frappe/frappe/app.py", line 114, in application
response = frappe.api.handle(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/__init__.py", line 49, in handle
data = endpoint(**arguments)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/api/v1.py", line 36, in handle_rpc_call
return frappe.handler.handle()
^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 50, in handle
data = execute_cmd(cmd)
^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
return frappe.call(method, **frappe.form_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/__init__.py", line 1726, in call
return fn(*args, **newargs)
^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/utils/typing_validations.py", line 31, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/desk/form/save.py", line 39, in savedocs
doc.save()
File "apps/frappe/frappe/model/document.py", line 342, in save
return self._save(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 364, in _save
return self.insert()
^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 295, in insert
self.run_before_save_methods()
File "apps/frappe/frappe/model/document.py", line 1103, in run_before_save_methods
self.run_method("validate")
File "apps/frappe/frappe/model/document.py", line 974, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1334, in composer
return composed(self, method, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 1316, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/model/document.py", line 971, in fn
return method_object(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "apps/frappe/frappe/website/doctype/website_theme/website_theme.py", line 50, in validate
self.generate_bootstrap_theme()
File "apps/frappe/frappe/website/doctype/website_theme/website_theme.py", line 110, in generate_bootstrap_theme
process = Popen(command, cwd=frappe.get_app_source_path("frappe"), stdout=PIPE, stderr=PIPE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/frappe/.pyenv/versions/3.12.8/lib/python3.12/subprocess.py", line 1026, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/home/frappe/.pyenv/versions/3.12.8/lib/python3.12/subprocess.py", line 1955, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'node'
Additional information
Ubuntu 24.04 Noble Numbat, using pyenv, nvm, and bare metal install method