Webpack - webpack-dev-server: command not found

后端 未结 11 1995
一个人的身影
一个人的身影 2020-12-22 23:29

I am working on a React webapp using webpack, loosely alongside this tutorial.

Accidentally, I added the node_modules folder to my git. I then removed it again using

11条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-23 00:00

    For global installation : npm install webpack-dev-server -g

    For local installation npm install --save-dev webpack

    When you refer webpack in package.json file, it tries to look it in location node_modules\.bin\

    After local installation, file wbpack will get created in location: \node_modules\.bin\webpack

提交回复
热议问题