Next.js
-
Nextjs 배포시 공식문서Next.js 2023. 8. 9. 12:00
https://nextjs.org/docs/pages/building-your-application/deploying 참고자료 https://m4nd4r1n.dev/docker-nginx-github-actions%EB%A1%9C-nextjs-%EC%9E%90%EB%8F%99-%EB%AC%B4%EC%A4%91%EB%8B%A8-%EB%B0%B0%ED%8F%AC%ED%95%98%EA%B8%B0#6570a268d076468eb365f4cc8892b85c 참고자료 https://github.com/vercel/next.js/blob/canary/examples/with-docker/README.md
-
-
[ERR]'AxiosHeaders | Partial<RawAxiosHeaders & MethodsHeaders & CommonHeaders>' 형식에 'Authorization' 속성이 없습니다.ts(7053)Next.js 2023. 1. 16. 13:45
axios 1.2.2버전 이슈 instance.interceptors.request.use((config:AxiosRequestConfig) => { const accessToken = Cookies.get('accessToken'); if (config.headers && accessToken) { config.headers!['Authorization'] = `Bearer ${accessToken}`; } return config; }); 보통 이렇게 axios interceptors를 이용해서 config header에다가 accessToken을 넣어주는데 2022-01-16일자로 axios를 설치 하게 되면 1.2.2가 설치 되어서 원래 사용하던대로 사용하니까 에러가 발생했다. 아래에 axios ..
-
Nextjs 보일러 프로젝트 생성 뼈대Next.js 2023. 1. 10. 22:02
1. tsconfig.json 설정 2. prettier 설정 3. sass 설치 npm i sass 공식문서 참고 -https://nextjs.org/docs/messages/install-sass 4. tailwind.css 설치 https://tailwindcss.com/docs/guides/nextjs Install Tailwind CSS with Next.js - Tailwind CSS Setting up Tailwind CSS in a Next.js v10+ project. tailwindcss.com tailwind.config.js const plugin = require('tailwindcss/plugin'); /** @type {import('tailwindcss').Config} */..
-
tsconfig.json 설정Next.js 2023. 1. 10. 16:59
tsconfig.json { "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true }, "include": ["next-env...
-
Nextjs에서 Nestjs로 accessToken header로 요청할때 오류Next.js 2022. 12. 26. 18:46
Unhandled Runtime Error AxiosError: Network Error has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response accessToken을 헤더로 전송할때 또 오류가 났다. //NextJs export const AuthApiClient = axios.create({ baseURL: "http://localhost:3001", withCredentials: true, headers: { 'Content-type': 'application/json', 'Authorization': 'Bear..