shiv
shiv
Explore posts from servers
CDCloudflare Developers
Created by shiv on 6/13/2024 in #pages-help
unable to deploy using wrangler
i've built a nextjs app with ai bindings that i am trying to deploy. however when i run npm run deploy - this happens.
~ npm run deploy

> npm run pages:build && wrangler pages deploy


> [email protected] pages:build
> npx @cloudflare/next-on-pages

⚡️ @cloudflare/next-on-pages CLI v.1.11.3

⚡️ Warning: It seems like you're on a Windows system, the Vercel CLI (run by @cloudflare/next-on-pages
⚡️ to build your application) seems not to work reliably on Windows so if you experience issues during
⚡️ the build process please try switching to a different operating system or running
⚡️ @cloudflare/next-on-pages under the Windows Subsystem for Linux

EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npm --version in C:\Users\shivs\Downloads\wall

STDOUT:



STDERR:

/bin/bash: line 1: cd: C:\Users\shivs\Downloads\wall: No such file or directory


⚡️ Unexpected error: {"retCode":1,"cmd":"npm --version","stdout":"","stderr":"/bin/bash: line 1: cd: C:\\Users\\shivs\\Downloads\\wall: No such file or directory
⚡️ "}
~ npm run deploy

> npm run pages:build && wrangler pages deploy


> [email protected] pages:build
> npx @cloudflare/next-on-pages

⚡️ @cloudflare/next-on-pages CLI v.1.11.3

⚡️ Warning: It seems like you're on a Windows system, the Vercel CLI (run by @cloudflare/next-on-pages
⚡️ to build your application) seems not to work reliably on Windows so if you experience issues during
⚡️ the build process please try switching to a different operating system or running
⚡️ @cloudflare/next-on-pages under the Windows Subsystem for Linux

EXIT WHEN NOT EXPECTED

SHELLAC COMMAND FAILED!
Executing: npm --version in C:\Users\shivs\Downloads\wall

STDOUT:



STDERR:

/bin/bash: line 1: cd: C:\Users\shivs\Downloads\wall: No such file or directory


⚡️ Unexpected error: {"retCode":1,"cmd":"npm --version","stdout":"","stderr":"/bin/bash: line 1: cd: C:\\Users\\shivs\\Downloads\\wall: No such file or directory
⚡️ "}
2 replies
TTCTheo's Typesafe Cult
Created by shiv on 6/7/2023 in #questions
next/font fonts won't load
Just setup a t3 project but the fonts don't seem to be loading. app.tsx:
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { api } from "~/utils/api";
import "~/styles/globals.css";
import { appWithTranslation } from "next-i18next";

import nextI18nConfig from "../../next-i18next.config.mjs";

import { Red_Hat_Display, DM_Sans } from "next/font/google";

const rhd = Red_Hat_Display({
subsets: ["latin"],
variable: "--font-rhd",
display: "swap"
});

const dm_sans = DM_Sans({
subsets: ["latin"],
variable: "--font-dm_sans",
weight: "400",
display: "swap"
});


const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={`${rhd.variable} ${dm_sans.variable} font-main`}>
<Component {...pageProps} />
</main>
</SessionProvider>
);
};


const I18nApp = appWithTranslation(MyApp, nextI18nConfig);
export default api.withTRPC(I18nApp);
import { type Session } from "next-auth";
import { SessionProvider } from "next-auth/react";
import { type AppType } from "next/app";
import { api } from "~/utils/api";
import "~/styles/globals.css";
import { appWithTranslation } from "next-i18next";

import nextI18nConfig from "../../next-i18next.config.mjs";

import { Red_Hat_Display, DM_Sans } from "next/font/google";

const rhd = Red_Hat_Display({
subsets: ["latin"],
variable: "--font-rhd",
display: "swap"
});

const dm_sans = DM_Sans({
subsets: ["latin"],
variable: "--font-dm_sans",
weight: "400",
display: "swap"
});


const MyApp: AppType<{ session: Session | null }> = ({
Component,
pageProps: { session, ...pageProps },
}) => {
return (
<SessionProvider session={session}>
<main className={`${rhd.variable} ${dm_sans.variable} font-main`}>
<Component {...pageProps} />
</main>
</SessionProvider>
);
};


const I18nApp = appWithTranslation(MyApp, nextI18nConfig);
export default api.withTRPC(I18nApp);
tailwind.config.ts
import fontFamily from "tailwindcss/defaultTheme"
import { type Config } from "tailwindcss";

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx}",
"./node_modules/@openkind/components/**/*.js",
],
theme: {
extend: {
colors: {
darkBg: "#292a2d",
},
fontFamily: {
main: ["var(--font-dm_sans)", fontFamily.sans],
heading: ["var(--font-rhd)", fontFamily.sans],
},
},
},
presets: [require("@openkind/components/tailwind.config")],
} satisfies Config;
import fontFamily from "tailwindcss/defaultTheme"
import { type Config } from "tailwindcss";

/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/**/*.{js,ts,jsx,tsx}",
"./node_modules/@openkind/components/**/*.js",
],
theme: {
extend: {
colors: {
darkBg: "#292a2d",
},
fontFamily: {
main: ["var(--font-dm_sans)", fontFamily.sans],
heading: ["var(--font-rhd)", fontFamily.sans],
},
},
},
presets: [require("@openkind/components/tailwind.config")],
} satisfies Config;
7 replies
TTCTheo's Typesafe Cult
Created by shiv on 6/7/2023 in #questions
Customizing the t3 stack
so i have some boilerplate code so like some components, i18n and stuff setup which i want to use with the t3 stack, setting up everything and making a github template repo works but it quickly gets outdated what's the best way to approach this? because i have no idea where to get started basically i want to generate the t3 stack and have all the components and i18n setup
8 replies
TTCTheo's Typesafe Cult
Created by shiv on 4/15/2023 in #questions
Adding prisma after init
I've already inited a t3 app but I want to add the prisma add-on on top. How can I ?
3 replies
TTCTheo's Typesafe Cult
Created by shiv on 3/13/2023 in #questions
Updating Context in an endpoint
How do I update the values in the ctx variable that is passed to the endpoint?
5 replies