강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

뉸뉴님의 프로필 이미지
뉸뉴

작성한 질문수

[리뉴얼] React로 NodeBird SNS 만들기

Browserslist에러 질문

작성

·

1.9K

0

Browserslist: caniuse-lite is outdated. Please run:

npx browserslist@latest --update-db

ready - started server on http://localhost:3000

info - automatically enabled Fast Refresh for 1 custom loader

C:\Users\내컴\Desktop\fashionary\front\node_modules\next\dist\build\webpack-config.js:38

const isLocal=request.startsWith('.')||// Always check for unix-style path, as webpack sometimes

안녕하세요 선생님. 프론트단을 실행하려고 보니까 위와 같은 메시지가 떠서

에러메시지에 나온대로 터미널에 npx browserslist@latest --update-db를 입력했는데도 같은 에러가 뜨는건 어디를 봐야 하는 건가요?

답변 1

0

제로초(조현영)님의 프로필 이미지
제로초(조현영)
지식공유자

음.. 일단 저 부분이 에러가 아닌 것 같습니다. 전체 메시지를 올려주세요.

뉸뉴님의 프로필 이미지
뉸뉴
질문자

선생님 지금 보니까 제가 다른 라이브러리를 설치해서 써야 하는데 프론트에서 next.config.js 설정을

const withTM = require("next-transpile-modules")([
    "@fullcalendar/common",
    "@babel/preset-react",
    "@fullcalendar/common",
    "@fullcalendar/daygrid",
    "@fullcalendar/interaction",
    "@fullcalendar/react",
    "@fullcalendar/timegrid",
  ]);
  
  module.exports = withTM({
  });

이렇게 하라고 해서 프론트 폴더에 next.config.js을 만들고 위의 내용을 쓰니까

Browserslist: caniuse-lite is outdated. Please run:

npx browserslist@latest --update-db

ready - started server on http://localhost:3000

info - automatically enabled Fast Refresh for 1 custom loader

C:\Users\내컴\Desktop\fashionary\front\node_modules\next\dist\build\webpack-config.js:38

const isLocal=request.startsWith('.')||// Always check for unix-style path, as webpack sometimes

^

TypeError: Cannot read properties of undefined (reading 'startsWith')

at handleExternals (C:\Users\내컴\Desktop\fashionary\front\node_modules\next\dist\build\webpack-config.js:38:23)

at webpackConfig.externals (C:\Users\내컴\Desktop\fashionary\front\node_modules\next\dist\build\webpack-config.js:79:136)

at C:\Users\내컴\Desktop\fashionary\front\node_modules\next-transpile-modules\src\next-transpile-modules.js:167:44

at handleExternals (C:\Users\내컴\Desktop\fashionary\front\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:78:17)

at next (C:\Users\내컴\Desktop\fashionary\front\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:66:9)

at handleExternals (C:\Users\내컴\Desktop\fashionary\front\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:71:7)

at C:\Users\내컴\Desktop\fashionary\front\node_modules\webpack\lib\ExternalModuleFactoryPlugin.js:101:5

at C:\Users\내컴\Desktop\fashionary\front\node_modules\webpack\lib\NormalModuleFactory.js:400:5

at AsyncSeriesWaterfallHook.eval [as callAsync] (eval at create (C:\Users\내컴\Desktop\fashionary\front\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1)

at AsyncSeriesWaterfallHook.lazyCompileHook (C:\Users\내컴\Desktop\fashionary\front\node_modules\tapable\lib\Hook.js:154:20)

 

 

이런 메시지가 뜨더라구요..next.config.js 파일이 package.json과 같은 위치에 있으면 된다고 해서 그렇게 했는데 제가 어디서 틀렸는지 알 수 있을까요?ㅠㅠㅠ

뉸뉴님의 프로필 이미지
뉸뉴

작성한 질문수

질문하기