6. Error / / 2023. 11. 21. 23:14

[Error] yarn dev할때, ReferenceError: performance is not defined오류

문제

웹사이트 만들고 gitHub에 올린 후 내 개인 노트북으로 clone받고, yarn install 하고 yarn dev를 하려했더니 아래와 같은 오류가 난다..대략난감

imhyeonjeong@imhyeonjeongs-MacBook-Air  ~/Desktop/LIM-HYUN-JEONG   main ±  yarn dev
yarn run v1.22.19
$ next dev
/Users/imhyeonjeong/Desktop/LIM-HYUN-JEONG/node_modules/next/dist/bin/next:57
performance.mark("next-start");
^

ReferenceError: performance is not defined
    at Object.<anonymous> (/Users/imhyeonjeong/Desktop/LIM-HYUN-JEONG/node_modules/next/dist/bin/next:57:1)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

 

👍🏻 해결방법

현재 사용하고 있는 node 버전이 낮아서 그랬던 것..허무해!
nvm을 사용하는데 node 버전을 바꿔주니 문제없이 실행됐다.

nvm install --lts
imhyeonjeong@imhyeonjeongs-MacBook-Air  ~/Desktop/LIM-HYUN-JEONG   main ±  nvm install --lts
Installing latest LTS version.
Downloading and installing node v20.9.0...

Now using node v20.9.0 (npm v10.1.0)
nvm ls

위의 코드로 노드버전 확인 후 할것...흑

728x90
  • 네이버 블로그 공유
  • 네이버 밴드 공유
  • 페이스북 공유
  • 카카오스토리 공유