dub
dub copied to clipboard
Changes to be made for one click deployment
Note: one-click deployment is a bit broken at the moment – you'll need to change some of the hard-coded values in the codebase to get it working. We're working on fixing this.
@steven-tey I was able to get the site deployed on vercel, but the login redirects to app.dub.sh. I am assuming this is the hard-coded value to be rewritten. Can you please let me know what these values need to be changed to?
@GauravG8 how did you get it to deploy? I could not even get it to build, it was missing a TWITTER_AUTH_TOKEN which I then added, and now get:
18:14:39.588 | message: 'You currently have access to Twitter API v2 endpoints and limited v1.1 endpoints only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve',
18:14:39.588 | code: 453
18:14:39.589 | }
18:14:39.589 | ]
18:14:39.630 | [
18:14:39.630 | {
18:14:39.630 | message: 'You currently have access to Twitter API v2 endpoints and limited v1.1 endpoints only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve',
18:14:39.630 | code: 453
18:14:39.630 | }
18:14:39.630 | ]
18:14:39.952 | TypeError: Cannot read properties of null (reading 'id')
18:14:39.952 | at LaunchTweet (/vercel/path0/.next/server/app/dub.sh/metatags/page.js:614:18)
18:14:39.952 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
18:14:39.959 |
18:14:39.959 | Error occurred prerendering page "/dub.sh/metatags". Read more: https://nextjs.org/docs/messages/prerender-error
18:14:39.960 | TypeError: Cannot read properties of null (reading 'id')
18:14:39.960 | at LaunchTweet (/vercel/path0/.next/server/app/dub.sh/metatags/page.js:614:18)
18:14:39.960 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
18:14:40.227 | TypeError: Cannot read properties of undefined (reading 'map')
18:14:40.227 | at Globe (/vercel/path0/.next/server/app/dub.sh/page.js:5949:30)
18:14:40.227 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
18:14:40.647 | TypeError: Cannot read properties of undefined (reading '0')
18:14:40.647 | at /vercel/path0/.next/server/app/dub.sh/page.js:6004:52
18:14:40.647 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
18:14:40.647 | at async Stats (/vercel/path0/.next/server/app/dub.sh/page.js:5997:20)
18:14:40.802 |
18:14:40.802 | Error occurred prerendering page "/dub.sh". Read more: https://nextjs.org/docs/messages/prerender-error
18:14:40.802 | TypeError: Cannot read properties of undefined (reading 'map')
18:14:40.802 | at Globe (/vercel/path0/.next/server/app/dub.sh/page.js:5949:30)
18:14:40.802 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
18:14:40.803 | - info Generating static pages (32/32)
18:14:40.805 |
18:14:40.805 | > Export encountered errors on following paths:
18:14:40.805 | /dub.sh/metatags/page: /dub.sh/metatags
18:14:40.805 | /dub.sh/page: /dub.sh
18:14:40.901 | error Command failed with exit code 1.
18:14:40.901 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
18:14:40.931 | Error: Command "yarn run build" exited with 1
18:14:41.089 | BUILD_UTILS_SPAWN_1: Command "yarn run build" exited with 1
Looks like Twitter removed the ability to retrieve tweet information using a free account API key, and so the build fails for me.
@frankyw you can remove all instances of TWITTER_AUTH_TOKEN
since that's just used to render the static tweets on the landing page.
@GauravG8 as for hard coded dub.sh
values, you'll set them to your custom domain (e.g. app.domain.com)
Closing this for now since it's a duplicate of #12