首页  >  问答  >  正文

Laravel Vite在运行npm run dev时遇到了困难

我正在使用Laravel 9。当我尝试运行npm install,然后运行npm run dev时,下面的错误显示出来。

VITE v3.0.9  ready in 648 ms

  ➜  Local:   http://127.0.0.1:5173/
  ➜  Network: use --host to expose

  LARAVEL v9.26.0  plugin v0.5.4

  ➜  APP_URL: http://127.0.0.1:8000
C:Software ProjectWeb DevelopmentAdminPanelnode_modulesesbuildlibmain.js:1356
        return callback(new Error(error), null);
                        ^

Error: The service was stopped: write EPIPE
    at C:Software ProjectWeb DevelopmentAdminPanelnode_modulesesbuildlibmain.js:1356:25    
    at C:Software ProjectWeb DevelopmentAdminPanelnode_modulesesbuildlibmain.js:678:9      
    at afterClose (C:Software ProjectWeb DevelopmentAdminPanelnode_modulesesbuildlibmain.js:656:7)
    at C:Software ProjectWeb DevelopmentAdminPanelnode_modulesesbuildlibmain.js:2075:11    
    at onwriteError (node:internal/streams/writable:417:3)
    at processTicksAndRejections (node:internal/process/task_queues:85:21)


P粉564192131P粉564192131370 天前737

全部回复(1)我来回复

  • P粉547362845

    P粉5473628452023-11-06 13:40:42

    问题出现在版本高于9.0的情况下

    下载一个新的Laravel项目

    输入以下命令,你的问题将会解决

    composer create-project laravel/laravel example-app 9.0

    以下命令将成功运行npm installnpm run dev

    回复
    0
  • 取消回复