laravel 8 安装错误 - npm run dev 抛出错误 [英] laravel 8 instalation error - npm run dev throws error

查看:162
本文介绍了laravel 8 安装错误 - npm run dev 抛出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试安装一个新的 Laravel 8 项目.下载前端脚手架后,当我尝试运行 npm run dev 时,它给了我一个错误.在这个npm run dev中安装jetstream时也会出现这个问题.我在下面给出错误.

I am trying to install a fresh laravel 8 project. After downloading frontend scaffolding when I try to run npm run dev it gives me an error. This problem also happens during installing jetstream in this npm run dev. I am giving error below.

unkno@DESKTOP-NAP4DRR MINGW64 /c/laravel projects/example
$ npm run dev

> @ dev C:\laravel projects\example
> npm run development


> @ development C:\laravel projects\example
> mix

[webpack-cli] Running multiple commands at the same time is not possible
[webpack-cli] Found commands: 'bundle', 'projects\example\node_modules\laravel-mix\setup\webpack.config.js'
[webpack-cli] Run 'webpack --help' to see available commands and options
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ development: `mix`
npm ERR! Exit status 2
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\unkno\AppData\Roaming\npm-cache\_logs\2021-01-09T03_39_54_620Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 2
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\unkno\AppData\Roaming\npm-cache\_logs\2021-01-09T03_39_54_704Z-debug.log


推荐答案

我可以看出您是 Windows 开发人员,并且您的项目文件夹名称中有空格.Windows、spaces 和 nodejs 不喜欢一起表现得很好.

I can see you are a Windows developer, and that you have spaces in the name of your project folder. Windows, spaces and nodejs don't like to behave very nicely together.

尝试删除项目路径名称中的空格,看看这是否能解决您的问题.

Try removing the spaces from name of your project path and see if this addresses the issue for you.

更新:根据类似的问题,Laravel,在全新安装上运行 npm run dev 时出错,解决了用户问题.

Update: As per a similar question, Laravel, error when running npm run dev on fresh new installation, this solved the users issue.

这篇关于laravel 8 安装错误 - npm run dev 抛出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆