简体   繁体   English

TypeError npm 运行开发

[英]TypeError npm run dev

I've cloned a Laravel GitHub repo, it has Laratrust and Laravel breeze.我克隆了一个 Laravel GitHub 回购,它有 Laratrust 和 Laravel 微风。 I installed a composer and downloaded node.js and did npm install && npm run dev in the project's file cmd. However this error shows up:我安装了一个作曲家并下载了 node.js 并在项目文件 cmd 中执行了npm install && npm run dev 。但是出现了这个错误: 在此处输入图像描述 This prevents me from viewing the Laravel project on my browser as the page says 'Server Error' because I need to successfully npm run dev first.这会阻止我在浏览器上查看 Laravel 项目,因为页面显示“服务器错误”,因为我需要先成功npm run dev

Basing on the message error, there is some problem with you laravel-vite-plugin/dist/index.js file.根据消息错误,您的 laravel-vite-plugin/dist/index.js 文件存在一些问题。 At line 108. It´s trying to replace some values of the appUrl string.在第 108 行。它试图替换 appUrl 字符串的一些值。 But it's your appUrl string is undefined.但这是您的 appUrl 字符串未定义。 Take a look on the library's github issues page, for the issue.查看图书馆的 github 问题页面,了解该问题。 Maybe there is something there to help you solve this.也许有一些东西可以帮助你解决这个问题。 But by the error it's it: appUrl is undefined at node_modules/laravel-vite-plugin/dist/index.js file, line 108.但是错误是:appUrl 在 node_modules/laravel-vite-plugin/dist/index.js 文件第 108 行未定义。

need to add.env file, it is not stored in repositories需要添加.env 文件,它不存储在存储库中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM