我已经安装了一个新的Laravel 8应用程序,然后我运行...
npm install
后来,我跑了...
npm run dev
我得到以下错误。
“mix”未被识别为内部或外部命令
> @ dev E:\wamp64\www\Laravel8Projects\Laravel_Livewire_JetStream_Projects\jetstream_blog
> npm run development
> @ development E:\wamp64\www\Laravel8Projects\Laravel_Livewire_JetStream_Projects\jetstream_blog
> mix
'mix' is not recognized as an internal or external command, operable
program or batch file. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm
ERR! @ development: `mix` npm ERR! Exit status 1 npm ERR! npm ERR!
Failed at the @ development script. npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-01-18T17_03_24_944Z-debug.log
npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @ dev: `npm run
development` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @
dev script. npm ERR! This is probably not a problem with npm. There is
likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR!
C:\Users\HP\AppData\Roaming\npm-cache\_logs\2021-01-18T17_03_24_980Z-debug.log
6条答案
按热度按时间bmp9r5qi1#
您可能需要安装最新版本的Laravel Mix。
rhfm7lfc2#
然后:
然后:
krcsximq3#
我的问题已通过以下步骤解决
ryhaxcpt4#
NPM安装它将修复它它之所以会发生,是因为您在以前的NMP I之后安装了一些东西
因此,在任何奇怪的情况下-再次安装NPM)
kgsdhlau5#
package.json要求您运行mix-watch命令,但它不起作用
一个简单的修复,为我工作是运行npm运行手表,它为我工作laravel 8项目
klh5stk16#
如果您是Windows用户,请尝试以下操作:
然后: