npm run start 시에 오류가 뜹니다..
구글에 찾아봐도 해결이 1시간째 안되고 있습니다. connected-react-router를 어떻게 하라는 지 모르겠네요 ㅜㅜ 강사님 도움주시면 정말 감사하겠습니다.
아래 링크에 들어가서 댓글에 있는 것들 설치해 보았으나 해결되지가 않습니다
https://stackoverflow.com/questions/53914013/failed-to-compile-module-not-found-cant-resolve-react-router-dom
(window / vscode에 bash 깔고 yarn도 깔은 환경입니다.)
cd client한 후에
npm i react react-router-dom react-router 해도 안되네요 ㅜㅜ
Answer 10
1
저는 client 로 이동해서 $ npm install --save history라고 쳤더니 정상적으로 작동했어요! 참고해주세요~
참고 사이트: https://stackoverflow.com/questions/45817017/module-not-found-error-cant-resolve-history-in-types-history
1
혹시 node 버전이 15버전인가요? 만약 그렇다면 14버전 lts를 설치해보시기 바랍니다.
그리고 wsl이면 wsl2로 업데이트 해보시기 바랍니다.
저도 node 14버전으로 다른 프로젝트 중인데, react 17과 connected-react-router 6.8.0과는 충돌은 발생하지 않았습니다.
다만 버전 15의 경우는 좀 충돌이 발생하더군요...
1
음... 패키지 제이슨에보니까 아예 없는데요... 디펜덴시에 보면 패키지가 connected-react-router 있는지 없는지 확인하실수있잖아요... 외부가 아니라 클라이언트 내부에 패키지 제이슨을 봐야되구요 없으면 명령어로 설치해주세요
1
아.. 저도 그거 해결했는데.. 그게 일단은 모듈이 패키지 제이슨 파일에 있는지 확인해보세요
제가 그거 했을땐 명령어 계속 했는데도 제대로 등록이 안되서 node_modules 파일 저거 지워보고 했거든요
패키지 제이슨 경로로 제대로 등록 안되서 그렇게 된거 같은데
npm install --save connected-react-router
0
제가 뭔가 설치를 잘못한거같아 다시 client 폴더 내부를 싹 다 지우고 14강부터 찬찬히 따라가 보았는데, 15강에서 client 폴더에 npm i redux react-redux redux-saga react-router-dom connected-react-router bootstrap reactstrap dotenv 하는 부분에서 강사님과는 달리 계속 아래와 같은 에러가 뜨면서 설치가 되지 않습니다.. 버전 dependency 이슈라는데 제가 초보라 어떻게 해결해야 할지 모르겠네요 ..ㅜㅜ
admin@DESKTOP-DQS8FS9 MINGW64 ~/Documents/MERN/client (master)
$ npm i redux react-redux redux-saga react-router-dom connected-react-router bootstrap reactstrap dotenv
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: client@0.1.0
npm ERR! Found: react@17.0.1
npm ERR! node_modules/react
npm ERR! react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.4.0" from connected-react-router@6.8.0
npm ERR! node_modules/connected-react-router
npm ERR! connected-react-router@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\admin\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Local\npm-cache\_logs\2021-02-10T01_29_24_319Z-debug.log
0
프레드님 말대로 해봤는데 안되네요 사실 반쯤 포기했습니다..ㅎㅎㅎㅎㅎ 다시 처음부터 세팅해야하는걸까요.. 혹시나 도움될까 싶어 pkg json 파일 내용올려놓겠습니다
client 폴더 package.json
외부 폴더 package.json 파일
0
npm i -g react react-router-dom react-router 말씀하시는 건가요?? 방금 해봤는데 안되네요 ㅜㅜ 도움 감사합니다
계속 이렇게만 뜨네요..ㅜㅜ
Failed to compile.
./src/App.js
Module not found: Can't resolve 'connected-react-router' in 'C:\Users\admin\Desktop\MERN\client\src'
npm run dev-watch 오류
0
77
1
npm i react-redex redux-saga react-router-dom connected-react-router bootstrap reactstrap dotenv 명령어 설치하면 에러날까요?
0
439
1
mongodb 자세히 알고 싶습니다
0
264
1
강의 듣으면서...포스트 맨도 안됩니다
0
247
1
혹시 gatsby 생성하는 명령어 하는지 알고 싶습니다
0
274
1
webpack 설정 문제입니다.
0
309
1
Category관련 질문
0
232
1
https://www.ssaple.net/ 블로그 접속이 되질 않아요.
0
311
1
리액트 버전 오류 나시는 분들 참고
0
481
1
react 18버전에서의 connected-react-router 가 설치가안됩니다
0
1069
1
jwt.sign() 에서의 질문입니다.
0
207
1
ssaple.net 접속이 안됩니다.
0
368
1
Media(Video) 파일 첨부관련 질문
0
296
1
페이지 Link를 이용한 페이지 이동이 안됩니다
0
339
1
webpack.config.js 설정
0
832
1
몽고db 사이트가 많이 바뀌어서
0
344
1
선생님 req에 아무것도 안들어오는데 혹시 뭐가문제일까요 ?
0
302
1
안녕하세요 강의 잘 보고 있습니다 질문 하나 있는데요 ..
0
1586
1
그대로 따라하였고 하루종일 reboot하는데 되지않습니다..
0
213
1
Encountered two children with the same key 에러..
0
865
1
강사님 redux에러 질문이요
1
244
2
선생님 왜 저는 백날해도 collapse 내용이 link아래로 갈까요?
0
350
2
postDetail scss 문제
0
233
3
강사님 포스트 디테일 부분을 똑같이 작성하였는데 이런 오류가 나서 도저히 방법을 모르겠습니다 ㅠㅠ
0
211
1

