레딧 사이트 만들기(NEXTJS) 오류1

88·2023년 10월 18일

raddit 만들기

목록 보기
1/1

console 에러
AxiosError: Network Error

콘솔에선 네트워크 오류라고 나와 구글을 다 찾아 따라해봤지만 해결할 수 없었다.
한참 뒤에 server 터미널을 보니

'ReferenceError: Comment is not defined'

Vote.ts
Vote entity에서 Comment를 잘못 임포트하여 생긴 문제였다

해결된 듯 싶었지만 바로 500번이 떴다...

그 다음 에러는
MissingPrimaryColumnError: Entity "Sub" does not have a primary column. Primary column is required to have in all your entities. Use @PrimaryColumn decorator to add a primary column to your entity.

아무리봐도 import도 잘 된 것 같았는데
자동 import를 제대로 확인하지 못해서 생긴 오류였다

import BaseEntity from 'typeorm' (X)
import BaseEntity from './Entity'; (O)

tailwind 적용 안됨
tailwind.config.js

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    './app/**/*.{js,ts,jsx,tsx,mdx}',
    './pages/**/*.{js,ts,jsx,tsx,mdx}',
    './components/**/*.{js,ts,jsx,tsx,mdx}',

    // Or if using `src` directory:
    './src/**/*.{js,ts,jsx,tsx,mdx}',
  ],
  theme: {
    extend: {},
  },
  plugins: [],
};

0개의 댓글