Back
after changing a local function it stops working and displaying in the browser
- 0
- Self Hosted
- Functions
TypeScript
Preparing for start ...
✓ Success: Visit http://localhost:3000/ to execute your function.
helpers/start.sh: source: line 12: can't open '/usr/local/server/src/function/.open-runtimes': No such file or directory
if you create an empty file .open-runtimes in the folder with the function, you get the following error:
TypeScript
Starting ...
HTTP server successfully started!
Traceback (most recent call last):
File "/usr/local/server/src/server.py", line 111, in action
output = await execute(context)
File "/usr/local/server/src/server.py", line 91, in execute
userModule = importlib.import_module("function." + userPath)
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'function.main'
TL;DR
Local function stopped working and displaying in the browser after being changed.
Error message indicates missing file '.open-runtimes'.
Creating an empty file with that name leads to a 'No module named 'function.main'' error.
Solution: Ensure the correct directory paths are set in the code and that all dependencies are properly linked.Recommended threads
- Functions in cloud console not works
please advise as all of my runing functions on Appwrite console was working before , but now it give this error [Invalid `headers` param: Value must be a valid...
- Production down - createExecution return...
Hey, Since 1.9.6 rollout in fra (~17:00 UTC, 14 Aug), POST /v1/functions/{functionId}/executions returns a 400 whenever the body includes an empty headers ob...
- CreateRow is doing ListRows on self-host...
### setup ``` appwrite 1.9.5 self-hosted bun 1.3 node-appwrite 27.1.0 ``` ### issue Im running a function on a self hosted 1.9.5 with "node-appwrite": "^27.1.0...