본문 바로가기

오류11

[nextjs] You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default 오류 해결 x You're importing a component that needs useState. It only works in a Client Component but none of its parents are marked with "use client", so they're Server Components by default.| Learn more: https://nextjs.org/docs/getting-started/react-essentials||,-[C:\Users\vsc\app\main\artist[id]\page.tsx:1:1]1 | import { useEffect, useState } from 'react';:                                  ^^^^^^^^2 | .. 2025. 2. 8.
[nextjs 14] Export encountered errors on following paths: 오류 해결 nextjs 14에서import { useSearchParams } from 'next/navigation';사용하게 됐을 때 아래와 같은 에러가 났다로컬Export encountered errors on following paths:vercel⨯ useSearchParams() should be wrapped in a suspense boundary at page "/main/artist". Read more: https://nextjs.org/docs/messages/missing-suspense-with-csr-bailout 문제는 파라미터로 동적으로 페이지를 불러올때는하위 페이지를 불러올 때 정적 페이지 /page가 아닌 값으로 불러와야한다나는 id로 값을 넘기고 있으니 "[id]" 와 같은 페이.. 2025. 2. 8.
[에러 해결] Type error: Type 'OmitWithTag<{ id: string; }, keyof PageProps, "default">' does not satisfy the constraint '{ [x: string]: never; }'. Property 'id' is incompatible with index signature. Type 'string' is not assignable to type 'never'. nextjs 를 사용하다 아래와 같은 에러를 만났다.next/types/app/main/detail/page.ts:28:13Type error: Type 'OmitWithTag' does not satisfy the constraint '{ [x: string]: never; }'.Property 'id' is incompatible with index signature.Type 'string' is not assignable to type 'never'.Check the prop type of the entry functioncheckFields, 'default'>>()이것저것 찾아보니 결국 리액트 Page로 쓰는건 파라미터를 받을 수 없다는게 문제였다...(서버개발만하다 UI쪽 하니까 모르는게 너무.. 2024. 10. 13.
[오류 해결] .nuget\packages\~~~ 파일을 찾을 수 없으므로 복사할 수 없습니다. C# 솔루션을 빌드하는데 갑자기 아래와 같은 에러가 떴다. 오류 MSB3030 .nuget\packages\system.numerics.vectors\4.5.0\lib\net46\Systehttp://m.Numerics.Vectors.dll" 파일을 찾을 수 없으므로 복사할 수 없습니다. C:\Program Files\Microsoft Visual Studio\2022\Professional\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets 4879 검색으로 이것저것 찾아봤는데 특별히 답나온건 없었다. 그래서 뭔가 알 것 같은 상사분께 질문드린 결과 그냥 VS 업데이트 하면 된다고 하셨다. (그 분도 이걸로 몇시간 날리셨다고...) vi.. 2024. 9. 29.
[에러 해결 ]Next.js Image 에러 - Error: Invalid src prop hostname "~~~" is not configured under images in your `next.config.js` next.js에서유튜브의 썸네일 링크를 뽑아내 썸네일을 보여주려고 시도했다.먼저 테스트로 만들어놓고 이미지 소스 작성Image 를 사용하기 위해서 'next/image' 임포트실행 후 들어가보니까 에러가 났다Error: Invalid src prop (https://i.ytimg.com/vi/u8wu6fDGK44/maxresdefault.jpg) on next/image, hostname "i.ytimg.com" is not configured under images in your next.config.jsSee more info: https://nextjs.org/docs/messages/next-image-unconfigured-host공식문서를 보니까 next.config에 도메인을 추가해줘야 하는.. 2024. 8. 24.
GCP SSH VSCode로 연결하면서 생긴 문제 목록 해결 링크 : https://wooiljeong.github.io/server/gce-vscode/위 링크를 보며 연결하다가 실패한 원인과 해결 방법들을 적어놓기 위해 작성했다1. 연결 실패두 가지 원인1) 키 경로를 제대로 지정해 주지 않아 문제 발생IP주소를 바꿔 에러 내용은 타임아웃으로 바뀜경로를 지정하면서 해당 키를 못찾아 문제가 발생했다경로를 복사했더니 \가 사라지며 위 캡처처럼 됐다.위 IdentityFile에서 경로 및 파일이름까지 제대로 지정했는지 확인해야한다추가로 파일이름을 지정안하고 경로만 지정해서 에러 났었던 경우도 있었다꼭 경로와 파일이름 적기 ex) D:\test\ssh_key (파일이름)2) ssh키가 정상적이지 않아 문제 발생gcp에 등록하는데 복사를 잘못해 ssh키가 제대로 등록이.. 2024. 5. 6.