Open Stankman opened 6 days ago
Same issue here
Same issue happening for me as well, did anyone find a solution??
Hi @Stankman ! Can you post full error with the stacktrace?
Hi, I'm facing a similar issue, I believe it is mostly similar to the issue of Stankman. It occurs when trying to access http://localhost:3000/dev
. In my case, the stack trace would be the following, but please feel free to post yours if it differs somehow.
TypeError: ee.on is not a function
at first (C:\Workspaces\ws-nest\serverless-project\node_modules\ee-first\index.js:43:10)
at onSocket (C:\Workspaces\ws-nest\serverless-project\node_modules\on-finished\index.js:115:16)
at attachFinishedListener (C:\Workspaces\ws-nest\serverless-project\node_modules\on-finished\index.js:120:5)
at attachListener (C:\Workspaces\ws-nest\serverless-project\node_modules\on-finished\index.js:147:5)
at onFinished (C:\Workspaces\ws-nest\serverless-project\node_modules\on-finished\index.js:53:3)
at send (C:\Workspaces\ws-nest\serverless-project\node_modules\finalhandler\index.js:319:3)
at C:\Workspaces\ws-nest\serverless-project\node_modules\finalhandler\index.js:135:5
at C:\Workspaces\ws-nest\serverless-project\node_modules\express\lib\router\index.js:646:15
at next (C:\Workspaces\ws-nest\serverless-project\node_modules\express\lib\router\index.js:216:14)
at Function.handle (C:\Workspaces\ws-nest\serverless-project\node_modules\express\lib\router\index.js:175:3)
Bug Report
Current Behavior
When running
sls offline
for a Serverless application usingserverless-offline
with the configuration below, an error occurs:TypeError: ee.on is not a function
. This seems to prevent the expected startup of the local server.Sample Code
Expected behavior/code
The application should start without errors and expose the API endpoints locally using serverless-offline.
Environment
serverless
version: 4.4.7serverless-offline
version: 14.3.3node.js
version: v20.18.0OS
: macOS 15.0.1optional, if you are using any of the following frameworks to invoke handlers
nestJS
version: 10.4.5Possible Solution
It could be helpful to check for compatibility issues with serverless-offline or dependencies like ee-first in conjunction with the current node.js version.
Additional context/Screenshots
Output when running sls offline: