Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZERO-1554] Minimal repo fails on Node 20 when running vc dev #11238

Open
swarnava opened this issue Mar 7, 2024 · 0 comments
Open

[ZERO-1554] Minimal repo fails on Node 20 when running vc dev #11238

swarnava opened this issue Mar 7, 2024 · 0 comments

Comments

@swarnava
Copy link
Member

swarnava commented Mar 7, 2024

 [debug] [2024-02-13T09:11:31.176Z] Imported Builder "@vercel/node" from "/Users/wilsonpage/.config/yarn/global/node_modules/@vercel/node"
Error: Unexpected token 'export'
[builder]l-dev-node-20/api/hello.ts:1
export default async (_, res) => {
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:77:18)
    at wrapSafe (node:internal/modules/cjs/loader:1288:20)
    at Module._compile (node:internal/modules/cjs/loader:1340:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at cjsLoader (node:internal/modules/esm/translators:345:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:294:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:218:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
> [debug] [2024-02-13T09:11:31.761Z] Proxying to "@vercel/node" dev server (port=54961, pid=44707)
> [debug] [2024-02-13T09:11:31.770Z] Failed to complete request to /api/hello: Error: socket hang up
> [debug] [2024-02-13T09:11:31.770Z] Killing builder dev server with PID 44707
> [debug] [2024-02-13T09:11:31.770Z] Running shutdown callback for PID 44707
  • You can see that the TS code is not being compiled to CommonJS and the node runtime is complaining of "SyntaxError: Unexpected token 'export'".
  • I'm not sure why you're referring to npm run dev as I have no defined dev script or mention of such steps in the readme.

Repro is added on linear
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

No branches or pull requests

1 participant