본문 바로가기

🌳Frontend/error log7

[ERROR] command not found: nvm 상황 분명히 `nvm`이 분명히 설치되어 있는 상황임에도, shell 명령어를 입력하면 command not found: nvm 에러가 떴다. 원인 shell 에서 `nvm`을 실행시킬 때 필요한 환경변수가 제대로 세팅이 되어있지 않아서 생긴 문제. OS입장에서 해당 nvm 프로세스를 실행시키 위한 경로가 필요한데, 그 경로를 찾을 수 없어서 생긴 문제라고 보면 된다. 보통 사용하는 OS에 따라 shell bash 이나 zsh 이냐에 따라 다른데, 본인이 어떤 shell 을 사용하느냐에 따라 달라진다. (나는 bash방식으로 셋팅하고 잘 써왔다가, mac os 업데이트 후 이 오류가 발생했다. 알고보니 업데이트 후 shell 이 zsh 로 변경되었던 것.) 해결하기 전 필독 1. 나는 지금 사용하고 있.. 2023. 5. 26.
[ERROR] Jest encountered an unexpected token.. Jest encountered an unexpected token Jest failed to parse a file. This happens e.g. when your code or its dependencies use non-standard JavaScript syntax, or when Jest is not configured to support such syntax. Out of the box Jest supports Babel, which will be used to transform your files into valid JS based on your Babel configuration. By default "node_modules" folder is ignored by transformers... 2023. 5. 24.
[ERROR] TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. TypeError: createContext only works in Client Components. Add the "use client" directive at the top of the file to use it. 원인 Next.js 13 app router 를 사용할 경우, React 관련 기능을 쓰려면 클라이언트로 컴포넌트로 작성해야 된다. 해결방안 Next.js에서는 컴포넌트가 클라이언트에서 작동하라고 지정하는 디렉티브를 쓴다. 파일 첫 줄에 'use clinet' 라고 입력하면, 그 파일은 자동으로 클라이언트 컴포넌트로 취급되고 컴파일된다. 2023. 5. 23.
[ERROR] Error: Invalid src prop .. is not configured under images in your 외부에서 이미지파일을 불러왔을 때 발생하는 에러. Error: Invalid src prop (url..) on `next/image`, hostname "hostname.." is not configured under images in your `next.config.js` See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host next.config.js 에 hostname 뒤에 따옴표로 감싸진 링크를 추가하면 된다. /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, images: { domains: ['hostname.. 2023. 5. 18.
728x90
반응형