1、执行命令:npm run build 时,提示:npm ERR! Missing script: “build”。如图1
图1
PS E:\wwwroot\object> npm run build
npm ERR! Missing script: "build"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Lenovo\AppData\Local\npm-cache\_logs\2022-04-15T01_30_16_068Z-debug.log
3、根据提示:To see a list of scripts, run: npm run。要查看脚本列表,请运行 npm run。支持:npm run dev、npm run prod。如图3
图3
PS E:\wwwroot\object> npm run
Lifecycle scripts included in undefined:
test
jest
available via `npm run-script`:
dev
npm run development
development
mix
watch
mix watch
watch-poll
mix watch -- --watch-options-poll=1000
hot
mix watch --hot
production
mix --production
prod
npm run production
gh-pages
gh-pages -d public/docs -r https://github.com/pheye/wdocs.git
analyzer
NODE_ENV=production npm_config_report=true npm run prod
4、执行 npm run dev ,运行成功。如图4
图4
PS E:\wwwroot\object> npm run dev
> dev
> npm run development
> development
> mix
● Mix █████████████████████████ emitting (98%)
after emit
Laravel Mix v6.0.39
✔ Compiled Successfully in 127974ms