'webpack-dev-server' is not recognized as an internal or external command,

后端 未结 4 1462
名媛妹妹
名媛妹妹 2021-01-17 17:06

I cloned this Webpack Starter package through github using gitbash following a tutorial on pluralsight. I am trying to access webpack through Visual Studio Code\'s integrate

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 18:08

    Webpack command should be present in location: node_modules\.bin\

    In this case in package.json file we are referring to webpack-dev-server, but locally webpack-dev-server doesn't exist.

    First run following command for global installation:

    npm install -g webpack-dev-server
    

    Second execute local installation command, which will create node_modules\.bin\webpack-dev-server:

    npm install webpack-dev-server --save-dev
    

提交回复
热议问题