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

Fails to deploy static files when using ternary operator #235

Closed
styfle opened this issue Jan 21, 2019 · 0 comments · Fixed by #255
Closed

Fails to deploy static files when using ternary operator #235

styfle opened this issue Jan 21, 2019 · 0 comments · Fixed by #255

Comments

@styfle
Copy link
Member

styfle commented Jan 21, 2019

Hello again 👋

I had a problem deploying to Now 2.0 and I believe the root cause is in ncc and the way files are bundled together in the @now/node builder.

I was originally using a ternary operator to decide which file to dynamically read from the filesystem, but this always gave me the ENOENT: no such file or directory after deploying even though it worked fine on my machine.

After reading #216 I decided to see if changing the code would solve the problem and it worked! See the commit below for the fix.

vercel/og-image@ed2fd9c

This seems like it would be easy for users (like myself) to hit this bug and just give up. So it would be wonderful if this type of dynamic file reading could work with Now 2.0 😄

(forgive me if this is a duplicate bug)

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 a pull request may close this issue.

1 participant