header-img
Info :
728x90

Module not found Error: Can't resolve 'history' in @type/history ๋ผ๋Š” ์˜ค๋ฅ˜๊ฐ€ ๋œฌ๋‹ค

์ด๊ฒƒ์„ ํ•ด๊ฒฐํ•ด๋ณด๋„๋ก ํ•˜์ž.

 

1๋ฒˆ.

VSCode ๊ฐ™์€ ๊ฒฝ์šฐ ๋‹ค์ค‘ ์–ธ์–ด๋ฅผ ์ง€์›ํ•˜๋Š” ํ”„๋กœ๊ทธ๋žจ์ด๋ผ ๊ธฐ๋ณธ ํŒจํ‚ค์ง€์— ๋Œ€ํ•œ ์œ ํ˜• ์ •๋ณด๋ฅผ typescipt์— ๊ฐ€์ง€๊ณ  ์žˆ์ง€ ์•Š๋‹ค๊ณ  ํ•จ. ๊ณ ๋กœ history ๊ฐ™์€ ๊ธฐ๋Šฅ์€ ํฌํ•จ์ด ์•ˆ๋˜์–ด์„œ ๋”ฐ๋กœ ์„ค์น˜ํ•ด์ฃผ์–ด์•ผ ํ•œ๋‹ค๋Š” ๊ฒƒ ๊ฐ™์Œ. 

= ์‚ฌ์šฉ์ž๊ฐ€ ์ด๋Ÿฐ ์–ธ์–ด๋ฅผ ์“ฐ๊ฒ ๋‹ค ~~ ๋ผ๋Š” ์ •๋ณด๋ฅผ ๋„˜๊ฒจ์ฃผ๊ณ  ์ด๋Ÿฐ ๊ธฐ๋Šฅ์ด ํ•„์š”ํ•ด์š” ํ•˜๋Š” ์ผ์ข…์˜ ๊ณผ์ •

 

powershell ์—

npm install --save history
npm install react-router-dom --save

๋ฅผ ์ž…๋ ฅํ•ด์„œ ๋‘๊ฐœ๋ฅผ ๊น”์•„์คŒ..

๋‚˜๋Š” ๋‘๊ฐœ ๋‹ค ๊น”์•˜์ง€๋งŒ ๊ณ„์† ๊ฐ™์€ ์˜ค๋ฅ˜ ๋ฐœ์ƒ.. ํ•˜์ง€๋งŒ ๋ญ”๊ฐ€ ์•ˆ ๊น”๋ ค์žˆ๋˜๊ฒŒ ๊น”๋ฆฌ๋Š” ๋“ฏํ•œ ๋ฉ”์„ธ์ง€๋Š” ๋œจ๋”๋ผ.

์ด ์ƒํƒœ๋กœ ๋‹ค์Œ ๋‹จ๊ณ„ ์ง„์ž…

https://stackoverflow.com/questions/45817017/module-not-found-error-cant-resolve-history-in-types-history

 

Module not found Error: Can't resolve 'history' in @types/history

Am developing a React Application where I want to use @types/history module.. Installed npm install --save @types/history And in my component file trying to import like import {

stackoverflow.com

 

2๋ฒˆ.

๊ทธ๋Ÿฌ๊ณ  ๋‚˜๋‹ˆ genMapping ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒ..

https://stackoverflow.com/questions/72308375/im-getting-the-error-genmapping-maybeaddmapping-is-not-a-function-when-i-try

 

I'm getting the error "_genMapping.maybeAddMapping is not a function" when I try to collect coverage from jest tests

I was able to run my tests and collect it's coverage just fine a couple days ago. But when I tried to run it today I got the error (0 , _genMapping.maybeAddMapping) is not a function for every test...

stackoverflow.com

์—ฌ๊ธฐ ๊นŒ์ง€ ํ˜๋Ÿฌ์™”๋Š”๋ฐ ์ž๊พธ ๋ฌด์–ธ๊ฐ€๊ฐ€ ์Ž„ํ•˜๋”๋ผ..

๋ฌธ์ œ๊ฐ€ ๋˜๋Š” index.js ์— ๊ฐ€์„œ import ๊ตฌ๋ฌธ์„ ํ™•์ธํ•ด๋ณด์•˜๋”๋‹ˆ..

์•„๋‹ˆ๋‚˜ ๋‹ค๋ฅผ๊นŒ.. ๋Œ€์†Œ๋ฌธ์ž ์˜คํƒ€ ๋ฐœ๊ฒฌ

 

 

ใ…‹ใ…‹

 

 

๋”๋ณด๊ธฐ
FRONTEND/React