no image
[React] Invalid options object. Dev Server has been initialized using an options object that does not match the API schema
🥐 오류 Invalid options object. Dev Server has been initialized using an options object that does not match the API schema 🥐 해결 방법 1. npm install http-proxy-middleware --save 설치 2. src 폴더 밑에 setupProxy.js 파일 만들기 const { createProxyMiddleware } = require('http-proxy-middleware'); module.exports = function(app) { app.use( '/api', createProxyMiddleware({ target: 'http://localhost:8080', changeOrigin: ..
2023.04.17
no image
[React] express개발 code:'MODULE_NOT_FOUND' 에러
🥐 오류 code:'MODULE_NOT_FOUND 모듈이 있는데 왜 찾지를 못하니....진짜 대환장...그래도 오류는 해결해야한다. 🥐 해결 방법 1. package-lock.json 파일 삭제 2. node_modules 폴더 삭제 3. npm install 재실행
2023.04.17
no image
[React] Node JS 버전 변경 - windows
프로젝트 진행 과정 중 버전 때문에 고생을 많이 했다... 그래서 다음에는 이런 고생을 덜 했으면 하는 바람으로 글을 남긴다. 🥐 개발 환경 - windosw 10 - nvm - node js - npm 🥐 NVM 명령어 # node.js 버전 설치하기 nvm install v8 # node 최신 버전 설치 - 설치 당시 기준 nvm install node # node LTS 최신 버전 설치 nvm install --lts # 설치된 node.js 목록 확인 nvm ls # 특정 버전 node 사용하기 nvm use #필요없는 node 버전 삭제 nvm uninstall
2023.04.17
no image
[React] 오류: react-router-dom 설치 후 Route 오류
🥐 오류 해결 방법은 총 2개가 있다....헤매다가 결국 해결했다...허무하다...매우...... 👍 해결방법 1. 감싸주기 index.tsx:19 Uncaught Error: A is only ever to be used as the child of element, never rendered directly. Please wrap your in a . at invariant (index.tsx:19) at Route (index.tsx:230) at renderWithHooks (react-dom.development.js:14985) at mountIndeterminateComponent (react-dom.development.js:17811) at beginWork (react-dom.develo..
2023.03.24
no image
[React] 에러: Cannot find module 'react'
🌹 에러 The module 'react' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install react' The module 'react-dom' was not found. Next.js requires that you include it in 'dependencies' of your 'package.json'. To add it, run 'npm install react-dom' internal/modules/cjs/loader.js:883 throw err; ^ Error: Cannot find module 'react' Require..
2023.03.24
no image
[React] node 버전 다운 그레이드 하기
🥓 맥에서 다운 그레이드 $ npm install -g n $ n 6.10.3 다운 후, 버전 확인 $ node -v v6.10.3 🍟 윈도우 10에서 다운 그레이드 Control panel> program and features>Node.js 이동 후, 제거 웹사이트 https://nodejs.org/en/ 로 이동하여 버전을 다운로드하고 설치 .
2023.03.24
no image
[React]에러: react_dom_client__WEBPACK_IMPORTED_MODULE_1__.render is not a function show in the console of localhost:3000
🥨 에러메세지 at Module../src/index.js (index.js:7:1) at Module.options.factory (react refresh:6:1) at __webpack_require__ (bootstrap:24:1) at startup:7:1 at startup:7:1 ❗ 해결 방안 import {StrictMode} from 'react'; import {createRoot} from 'react- dom/client'; import App from './App' 참고: https://stackoverflow.com/questions/71945583/react-dom-client-webpack-imported-module-1-render-is-not-a-function-show-..
2023.03.24
no image
[React] 'Axios' is not defined
해결방법 '해당라이브러리' is not defined no-undef 오류가 났을 때는 import를 해주면 간단히 해결된다. import Axios from 'axios'; 또는 설치! npm i axios --global https://stackoverflow.com/questions/44342142/axios-is-not-defined
2023.03.16
no image
[React] Failed to compile. Module not found: Can't resolve 'react-router-dom'
에러 코드 Failed to compile. Module not found: Can't resolve 'react-router-dom' 설치 과정 $ yarn add react-router-dom $ yarn add cross-env --dev velopert님의 글을 보고 설치했다. react-router-dom: 브라우저에서 사용되는 리액트 라우터 입니다. cross-env: 프로젝트에서 NODE_PATH 를 사용하여 절대경로로 파일을 불러오기 위하여 환경 변수를 설정 할 때 운영체제마다 방식이 다르므로 공통적인 방법으로 설정 할 수 있게 해주는 라이브러리입니다. 해결 방법 Failed to compile. Module not found: Can't resolve 'react-router-dom' y..
2023.03.16