simonw / til

Today I Learned
https://til.simonwillison.net
Apache License 2.0
1.08k stars 85 forks source link

Deploy fails silently #45

Closed simonw closed 2 years ago

simonw commented 2 years ago

https://github.com/simonw/til/runs/6887335796 ran successfully but actually didn't deploy:

/usr/local/lib/node_modules/vercel/dist/index.js:201730
        .filter((b) => Boolean(b.config && b.config.zeroConfig && b.src?.startsWith('api/')))
                                                                        ^
SyntaxError: Unexpected token '.'
    at wrapSafe (internal/modules/cjs/loader.js:915:16)
    at Module._compile (internal/modules/cjs/loader.js:963:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47
simonw commented 2 years ago

Here's the bug:

simonw commented 2 years ago

https://github.com/vercel/vercel/releases/tag/vercel%4025.0.0 says:

This release drops support for Node.js 12 in all packages

But my action does this:

https://github.com/simonw/til/blob/e3ad444af8b405fc93ba62fbb4f52dcde6b3c232/.github/workflows/build.yml#L84-L87

simonw commented 2 years ago

That fixed it.