如何运行`npm run build'
我正在VUEJS应用程序中工作。我想将应用程序部署在CPanel中。我正在尝试运行 npm run build
。我要低于错误。
如果我运行 npm npm run
低于结果。
如何运行 npm run build build build
?
这是我的 package.json
。
{
"private": true,
"scripts": {
"dev": "npm run development",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "npm run production",
"production": "mix --production"
},
"devDependencies": {
"autoprefixer": "^10.2.5",
"axios": "^0.21",
"jquery": "^3.2",
"laravel-echo": "^1.10.0",
"laravel-mix": "^6.0.6",
"lodash": "^4.17.19",
"popper.js": "^1.12",
"postcss": "^8.2.8",
"pusher-js": "^7.0.3",
"resolve-url-loader": "^2.3.1",
"sass": "^1.20.1",
"sass-loader": "^8.0.0",
"tailwindcss": "^2.0.4",
"vue": "^2.6.12",
"vue-loader": "^15.9.5",
"vue-template-compiler": "^2.6.10"
},
"dependencies": {
"@webzlodimir/vue-bottom-sheet": "^1.2.0",
"moment-timezone": "^0.5.33",
"swiper": "^6.8.0",
"vue-awesome-swiper": "^4.1.1",
"vue-axios": "^3.2.4",
"vue-meta": "^2.4.0",
"vue-moment": "^4.1.0",
"vue-multiselect": "^2.1.6",
"vue-notification": "^1.3.20",
"vue-router": "^3.5.1",
"vue-social-auth": "^1.4.9",
"vue-social-sharing": "^3.0.8",
"vue-spinner": "^1.0.4",
"vue-star-rating": "^1.7.0",
"vue-tabs-with-active-line": "^1.2.6",
"vue2-editor": "^2.10.2",
"vue2-timeago": "^1.2.12",
"vuex": "^3.6.2"
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的应用程序没有 a
构建
命令。看起来您有一个Laravel应用程序;默认情况下,它具有两个构建命令,
npm Run dev
(加上npm Run Watch
,就像npm Run Run Dev 除非在代码更改时继续运行和重建,而
,但使用热重载)和npm运行热
,npm run run prod
。两者都会构建您的前端代码,但是prod
变体添加了诸如代码的简化之类的内容。我会在用于复习。那里有各种各样的重要内容。
Your app doesn't have a
build
command.Looks like you've got a Laravel app; by default, it has two build commands,
npm run dev
(plusnpm run watch
, which is likenpm run dev
except it keeps running and re-building when your code changes, andnpm run hot
, which does similar but with hot-reloading), andnpm run prod
. Both build your front-end code, but theprod
variant adds things like minification of the code.I'd re-read the Mix docs at https://laravel.com/docs/9.x/mix#running-mix for a refresher. There's a variety of important stuff in there to be aware of.