7

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

2 Answers 2

14

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

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you Oguzhan, this work on my end on installing ui react
After receiving '‘ErrorException copy(<path_to_install>/resources/css/app.css): failed to open stream: No such file or directory' - I had to create this missing css directory and blank app.css file, in order to run php artisan breeze:install react again without errors.
This helped me solve the same issue with php artisan ui bootstrap thank you. Who would have thought the file had to be created manually?
glad it did mate :)
1
mkdir resources/js 

should solve it then run

php artisan ui bootstrap 

after

php artisan ui vue

or

php artisan ui react

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.