UPLOADTHING_TOKEN ticks don's seem to work on railway.com
I am trying to run uploadthing on an app hosted on railway.com. Railway's management system for environment variables does not work with but works with
However, doing this the ticks encapsulating the token cause issues:
- if i leave the ticks in the token is too long by 2 characters, uploadthing complains: A token is a base64 encoded JSON object matching { apiKey: string, appId: string, regions: string[] }., ..Length must be a multiple of 4, but is 170 (full error is shown below)
- if i remove the ticks, I am getting: Error uploading file Invalid signing secret all these seems to be related to the ticks or their interaction with process.env, as environment variables used with process.env works fine for the database.
any ideas on what i can do?
Solution:Jump to solution
figured it out. added node:crypto to vite in app.config.ts:
```
optimizeDeps: {
include: ['node:crypto'],
},...
1 Reply
Solution
figured it out. added node:crypto to vite in app.config.ts: