alibaba / serverless-vscode

Aliyun Function Compute extension. Lets you develop your serverless application of Aliyun within VSCode.
GNU General Public License v2.0
291 stars 37 forks source link

TypeScript template just exits after being run #332

Open QYongHao opened 2 years ago

QYongHao commented 2 years ago

Describe the bug TypeScript server exits immediately after starting.

To Reproduce

  1. Create TypeScript function in VSCode.
  2. Run 'npm install' in TypeScript directory
  3. Click on 'Local Run' to deploy TypeScript server locally

Expected behavior TypeScript server should run indefinitely until the program is exited, accepting requests to the server.

Screenshots image

Desktop (please complete the following information):

Additional context Couldn't start TypeScript server at all until I ran 'npm install' to generate the node_modules. Please provide better documentation on running TypeScript template locally because the regular method does not work. Was able to run the server correctly with:

npm install
./node_modules/ts-node/dist/bin.js server.ts