npm ERR! missing script: build

今天创建了初始化了一个项目,最后运行的时候出现了以下报错:

D:\myproject\myweb>npm run build:8080 --report
npm ERR! missing script: build:8080
npm ERR!
npm ERR! Did you mean one of these?
npm ERR!     build:prod
npm ERR!     build:sit

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2020-05-25T02_49_46_836Z-debug.log

通过查看package.json文件发现,scripts 参数不对:正确添加后,

"scripts": {
    "build":"webpack --config ./webpack.config.js"
  },

再次运行正常
npm ERR! missing script: build_第1张图片

你可能感兴趣的:(前端)