node.js - 使用 yarn 构建 node.js 应用程序但出现错误 Command "build" not found
问题描述
这是我的 package.json 文件。
{
"name": "moneymall",
"version": "1.0.0",
"description": "A money mall server app.",
"main": "index.js",
"author": "Anbu Selvan",
"license": "ISC",
"keywords": [],
"dependencies": {
"body-parser": "^1.18.3",
"cors": "^2.8.5",
"e": "0.0.4",
"express": "^4.16.4",
"mysql": "^2.16.0",
"pug": "^2.0.3",
"yarn": "^1.15.2"
},
"devDependencies": {
"nodemon": "^1.18.10",
"react-scripts": "^2.1.8"
}
}
运行yarn build
并得到这个错误。
纱线运行 v1.15.2 错误命令“构建”未找到。info 访问 https://yarnpkg.com/en/docs/cli/run以获取有关此命令的文档
解决方案
如果执行yarn run
,它将显示可以运行的命令列表。
理想情况下yarn run dev
会完成编译构建的技巧
推荐阅读
- javascript - 打字稿中的forEach函数
- python-3.x - 循环遍历字典的python字典
- docker - 使用 docker-compose 时无法从 localhost 访问 docker 容器端口
- codeigniter - Codeigniter 框架:我们如何跟踪给定“视图”php 代码片段中的变量来自何处?
- javascript - 如何使用 JS 向一个元素添加多个类?
- visual-studio-code - 左键移回上一行的末尾
- sql - 在 postgreSQL 中提供路由的递归查询
- charts - 是否可以在不累加系列的情况下使用堆积柱形图?
- javascript - 将键值对从数组添加到 javascript 对象的问题
- php - 我无法在 fancybox-3 上预览缩略图