前端开发您现在的位置是:首页 > 博客日志 > 前端开发

npm ERR! missing script: build

<a href='mailto:'>微wx笑</a>的头像微wx笑 2020-12-15前端开发222 4 0关键字:   

在构建一个项目的时候,提示 npm ERR! missing script: buildnpm run buildnpm ERR! missing script: buildnpm ERR! A complete log of this run can be found in:npm ERR!

在构建一个项目的时候,提示 npm ERR! missing script: buildc1O无知

1
2
3
4
5
npm run build
npm ERR! missing script: build
 
npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/aven/.npm/_logs/2020-12-15T07_33_19_954Z-debug.log

这种错误查看 package.json 中scripts 参数配置c1O无知

1
2
3
4
5
6
7
8
9
10
11
"scripts": {
"dev""vue-cli-service serve",
"lint""eslint --ext .js,.vue src",
"build:prod""vue-cli-service build",
"build:stage""vue-cli-service build --mode staging",
"preview""node build/index.js --preview",
"new""plop",
"svgo""svgo -f src/icons/svg --config=src/icons/svgo.yml",
"test:unit""jest --clearCache && vue-cli-service test:unit",
"test:ci""npm run lint && npm run test:unit"
},

我这个项目是 build:prod ,所以 build 的时候执行 npm run build:prod 就可以了。c1O无知

本文由 微wx笑 创作,采用 署名-非商业性使用-相同方式共享 4.0 许可协议,转载请附上原文出处链接及本声明。
原文链接:https://www.ivu4e.cn/blog/front/2020-12-15/575.html

很赞哦! (13) 有话说 (0)

相关文章

文章评论