Skip to content

Improve build script for github-server#37

Merged
mincong-h merged 5 commits intomainfrom
ts
Feb 5, 2025
Merged

Improve build script for github-server#37
mincong-h merged 5 commits intomainfrom
ts

Conversation

@mincong-h
Copy link
Contributor

@mincong-h mincong-h commented Feb 5, 2025

Description

This PR brings some improvements for the github-server:

  • Use a Typescript configuration to clarify our expectations
  • Upgrade node.js to version 22

Testing

image

@vercel
Copy link

vercel bot commented Feb 5, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
demo-github-server ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 5, 2025 6:00am

@mincong-h
Copy link
Contributor Author

mincong-h commented Feb 5, 2025

The function has crashed https://demo-github-server-git-ts.vertesia.dev/api/hello

image

event though the functions were loaded correctly

image

(node:3) Warning: To load an ES module, set type: module in the package.json or use the .mjs extension.
(Use  to show where the warning was created)
(node:3) Warning: To load an ES module, set type: module in the package.json or use the .mjs extension.
/var/task/apps/github-server/api/hello.js:1
export default function handler(req, res) {
^^^^^^

SyntaxError: Unexpected token 'export'
    at wrapSafe (node:internal/modules/cjs/loader:1469:18)
    at Module._compile (node:internal/modules/cjs/loader:1491:20)
    at Object..js (node:internal/modules/cjs/loader:1689:10)
    at Module.load (node:internal/modules/cjs/loader:1318:32)
    at Function.<anonymous> (node:internal/modules/cjs/loader:1128:12)
    at /opt/rust/nodejs.js:2:12071
    at Function.ur (/opt/rust/nodejs.js:2:12445)
    at e.<computed>.Se._load (/opt/rust/nodejs.js:2:12041)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
@mincong-h mincong-h merged commit 0456650 into main Feb 5, 2025
4 checks passed
@mincong-h mincong-h deleted the ts branch February 5, 2025 06:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant