Thank you for the response and I apologize for misreading the other help thread.
I deployed a project that contains Node & Python serverless functions to Vercel and both endpoints work. However, when developing locally using the Vercel CLI I keep getting, this huge error:
when accessing http://localhost:8071/api/node
vercel dev --listen 8080
Vercel CLI 41.2.2
> Ready! Available at http://localhost:8080
Server is running on http://localhost:3000
file:///C:/Users/o0/.bun/install/global/node_modules/@vercel/node/dist/dev-server.mjs:1133
return listener(req, res);
^
TypeError: listener is not a function
at Server.<anonymous> (file:///C:/Users/o0/.bun/install/global/node_modules/@vercel/node/dist/dev-server.mjs:1133:12)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: Command failed: taskkill /pid 1808 /T /F
ERROR: The process "1808" not found.
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
Error: An unexpected error occurred!
Error: Command failed: taskkill /pid 1808 /T /F
ERROR: The process "1808" not found.
at ChildProcess.exithandler (node:child_process:422:12)
at ChildProcess.emit (node:events:517:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1098:16)
at ChildProcess._handle.onexit (node:internal/child_process:303:5)
and when accessing http://localhost:8071/api/python
vercel dev --listen 8071
Vercel CLI 41.2.2
> Ready! Available at http://localhost:8071
> Building @vercel/python@latest:api/main_flow.py
Installing required dependencies...
> Built @vercel/python@latest:api/main_flow.py [3s]
AssignProcessToJobObject: (87) The parameter is incorrect.
LambdaError: RequestId: a3e98b22-7754-4aa4-aa3b-c7966447871f Process exited before completing request
at Lambda.<anonymous> (C:\Users\o0\.bun\install\global\node_modules\@vercel\fun\dist\src\index.js:114:27)
at Generator.next (<anonymous>)
at fulfilled (C:\Users\o0\.bun\install\global\node_modules\@vercel\fun\dist\src\index.js:28:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
using HTTP Handler
Traceback (most recent call last):
File "C:\Python311\Lib\urllib\request.py", line 1348, in do_open
h.request(req.get_method(), req.selector, req.data, headers,
File "C:\Python311\Lib\http\client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "C:\Python311\Lib\http\client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "C:\Python311\Lib\http\client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Python311\Lib\http\client.py", line 1037, in _send_output
self.send(msg)
File "C:\Python311\Lib\http\client.py", line 975, in send
self.connect()
File "C:\Python311\Lib\http\client.py", line 941, in connect
self.sock = self._create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\socket.py", line 850, in create_connection
raise exceptions[0]
File "C:\Python311\Lib\socket.py", line 835, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\o0\AppData\Local\com.vercel.fun\Cache\runtimes\python\bootstrap.py", line 147, in <module>
lambda_runtime_main()
File "C:\Users\o0\AppData\Local\com.vercel.fun\Cache\runtimes\python\bootstrap.py", line 130, in lambda_runtime_main
(event, context) = lambda_runtime_next_invocation()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\o0\AppData\Local\com.vercel.fun\Cache\runtimes\python\bootstrap.py", line 56, in lambda_runtime_next_invocation
res = LambdaRequest('invocation/next')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\o0\AppData\Local\com.vercel.fun\Cache\runtimes\python\bootstrap.py", line 31, in __init__
req = urllib.request.urlopen(url, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 216, in urlopen
return opener.open(url, data, timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 519, in open
response = self._open(req, data)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 536, in _open
result = self._call_chain(self.handle_open, protocol, protocol +
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 496, in _call_chain
result = func(*args)
^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 1377, in http_open
return self.do_open(http.client.HTTPConnection, req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\urllib\request.py", line 1351, in do_open
raise URLError(err)
urllib.error.URLError: <urlopen error [WinError 10061] No connection could be made because the target machine actively refused it>
I changed up the ports because I thought it might have to do with ports being in use. Long errors, I just wanted to share but maybe I’m just tired since its late here, I’ll take a look at these tomorrow and update.
Note: I installed the Vercel CLI using Bun, I don’t know if that might be the issue.