Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php artisan ui vue get ErrorException failed to open stream: No such file or directory

I'm installing vuejs for my Laravel project, but when I use command with php artisan ui vue I got an error like this:

Please tell me how can I fix this error, thanks very much.

ErrorException

  copy(D:\Code\Hung's Friend\management\resources\sass/_variables.scss): failed to open stream: No such file or directory

  at D:\Code\Hung's Friend\management\vendor\laravel\ui\src\Presets\Bootstrap.php:42
    38|      * @return void
    39|      */
    40|     protected static function updateSass()
    41|     {
42|         copy(__DIR__.'/bootstrap-stubs/_variables.scss', resource_path('sass/_variables.scss'));
    43|         copy(__DIR__.'/bootstrap-stubs/app.scss', resource_path('sass/app.scss'));
    44|     }
    45|
    46|     /**

  1   D:\Code\Hung's Friend\management\vendor\laravel\ui\src\Presets\Bootstrap.php:42
      copy("D:\Code\Hung's Friend\management\vendor\laravel\ui\src\Presets/bootstrap-stubs/_variables.scss", "D:\Code\Hung's Friend\management\resources\sass/_variables.scss")

  2   D:\Code\Hung's Friend\management\vendor\laravel\ui\src\Presets\Bootstrap.php:15
      Laravel\Ui\Presets\Bootstrap::updateSass()

enter image description here

like image 355
Lê Thái Avatar asked May 04 '20 13:05

Lê Thái


People also ask

Why PHP artisan serve not working?

Reasons why php artisan serve not working You are running php artisan serve command in wrong directory. php artisan serve is laravel command only work with laravel project. Check project directory and run in root directory of your project. The requested host or port is not available.

What is PHP artisan serve in laravel?

The Laravel PHP artisan serve command helps running applications on the PHP development server. As a developer, you can use Laravel artisan serve to develop and test various functions within the application. It also accepts two additional options. You can use the host for changing application's address and port.


Video Answer


1 Answers

You need to put two files in your resources folder

resources/sass/_variables.scss
resources/js/bootstrap.js

after you put those files run

php artisan ui vue

like image 78
Oguzhan Avatar answered Nov 10 '22 22:11

Oguzhan