강의

멘토링

커뮤니티

Inflearn Community Q&A

ahyiel's profile image
ahyiel

asked

Webpack for Frontend Developers

Getting Started with Webpack Tutorial Part 1 - Before Applying Webpack

이 에러가 계속 뜨는데 어떻게 해야할까요? ㅠ

Written on

·

364

1

아래와 같은 방법을 써봤는데 안되더라구요 ㅠ

  • npm cache clean --force
  • delete node_modules folder
  • delete package-lock.json file
  • npm install

오류 메세지

Insufficient number of arguments or no entry found.

Alternatively, run 'webpack(-cli) --help' for usage info.

Hash: 450784a2e0438262e127

Version: webpack 4.44.2

Time: 31ms

Built at: 2020-09-20 9:48:22 ├F10: PM┤

WARNING in configuration

The 'mode' option has not been set, webpack will fallback to 'production' for this value. Set 'mode' option to 'development' or 'production' to enabledefaults for each environment.

You can also set it to 'none' to disable any default behavior. Learn more: https://webpack.js.org/configuration/mode/

ERROR in Entry module not found: Error: Can't resolve './src' in '/Users/Eric/study/webpack/npm/getting-started'

npm ERR! code ELIFECYCLE

npm ERR! errno 2

npm ERR! getting-started@1.0.0 build: `webpack`

npm ERR! Exit status 2

npm ERR!

npm ERR! Failed at the getting-started@1.0.0 build script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/Eric/.npm/_logs/2020-09-20T12_48_22_174Z-debug.log

웹팩

Answer 2

0

SuYun Lee님의 프로필 이미지
SuYun Lee
Questioner

안녕하세요~ webpack 파일을 만들어서 진행하면 되고 웹팩 파일 없이 진행하면 오류가 났습니다. 일단 진행하기위해 webpack 파일 만들어서 실행했어요~

0

captain님의 프로필 이미지
captain
Instructor

안녕하세요 수연님, 답변이 너무 늦어져 죄송합니다 :)

npm i 명령어를 치셨을 때 위와 같은 에러가 나는 건가요? 에러 메시지에서는 웹팩 빌드 명령어를 실행했을 때 웹팩 빌드 파일 대상 경로가 잘못 되었다고 나오는 것 같은데.. 한번 확인해보시고 알려주세요 :)

ahyiel's profile image
ahyiel

asked

Ask a question