ar
ar
Explore posts from servers
TTCTheo's Typesafe Cult
Created by ar on 11/9/2023 in #questions
Standards for useNavigate and useRouter for creating npm package
I am making an npm package that I hope that both nextjs and react developers can use. In my package, i use useRouter to do a router.push to change routes. Is there a way people standardize this to support this functionality regardless of if someone uses React (like a Vite app) or NextJs?
4 replies
RRailway
Created by ar on 10/9/2023 in #✋|help
Bug with re-adding custom domain after deleting it?
I added a custom domain to my project (api.mydomain.com) and it wasnt working at first, so i went to add another one (hey.mydomain.com). Then the hey.mydomain.com one began working, but the api.mydomain.com didnt. So then I deleted api.mydomain.com and tried adding it again. But for some reason, even if i dont update the DNS record with the new value it gives me for api.mydomain.com, when i dismiss the modal telling me to change the DNS record, it says its all setup But it still isnt setup. And i tried doing this with other domains like deleting and re-adding hey.mydomain.com and it says it's connected even though its not.
26 replies
RRailway
Created by ar on 10/9/2023 in #✋|help
Deploying Turborepo project with a fastify workspace
Hey everyone! I setup a turbo repo project that has the following structure: /apps: - apps/api (containing fastify server and its own package.json) <- this is what i want to deploy on railway - apps/web (containing a nextjs project) <- i want to deploy this on vercel later /pnpm-lock.yaml (seems like the content that would normally be in the apps/api pnpm.lock file are in this) I set the root directory in railway settings to /apps/api and changed the build and start commands to pnpm build and pnpm dev respectively. The build fails everytime and the logs look like this:
╔════════ Nixpacks v1.17.0 ═══════╗

║ setup │ nodejs_18, npm-9_x ║

║─────────────────────────────────║

║ install │ npm i ║

║─────────────────────────────────║

║ build │ pnpm build ║

║─────────────────────────────────║

║ start │ pnpm dev ║

╚═════════════════════════════════╝
╔════════ Nixpacks v1.17.0 ═══════╗

║ setup │ nodejs_18, npm-9_x ║

║─────────────────────────────────║

║ install │ npm i ║

║─────────────────────────────────║

║ build │ pnpm build ║

║─────────────────────────────────║

║ start │ pnpm dev ║

╚═════════════════════════════════╝
....
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm i" did not complet
ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm i" did not complet
I think it fails because it runs npm instead of pnpm to install. But how do i fix that?
12 replies