npm start해도 오류가 발생하는 문제

2177 단어 Reactredux

이번 오류



React Redux의 환경 구축으로 망설임
모두 설치할 수 있었다고 생각하고, 의기양양하게 커맨드를 친다
$ npm start
그러면 다음 오류 코드가 나와서 전혀 작동하지 않습니다

There might be a problem with the project dependency tree....


반성점



모든 언어는 공통적이며 오류 문장을 잘 읽습니다.
이미지 안에 있는 오렌지색 번호대로 진행해 가면 무사히 해결했습니다
일단 아래에 적어 둡니다.
  1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.

  2. Delete node_modules in your project folder.

  3. Remove "webpack" from dependencies and/or devDependencies in the package.json file in your project folder.

  4. Run npm install or yarn, depending on the package manager you use.

In most cases, this should be enough to fix the problem.
If this has not helped, there are a few other things you can try:

  5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead.
     This may help because npm has known issues with package hoisting which may get resolved in future versions.

  6. Check if /Users/home/node_modules/webpack is outside your project directory.
     For example, you might have accidentally installed something in your home folder.

  7. Try running npm ls webpack in your project folder.
     This will tell you which other package (apart from the expected react-scripts) installed webpack.

참고원



npm start에서 화가 났을 때의 이야기

좋은 웹페이지 즐겨찾기