1

I am running Laravel 8.0 with React 17.0.2.

I am trying to implement SSR for optimizing the app. For that I am referring this youtube tutorial which is using this package by spatie.

After setting up everything, I am getting the follwoing error

file_put_contents(../storage/app/ssr/9fa7979d88956cb5cc5019e5ee1fe73b.js): Failed to open stream: No such file or directory (View: ../resources/views/index.blade.php)

There is a config file ssr.php where I need to defined node.temp path

'node' => [
    'node_path' => env('NODE_PATH', '/usr/local/bin/node'),
    'temp_path' => env('SSR_TEMP_PATH', storage_path('app/ssr')),
],

What should be this temp_path as there is no such directory called ssr in my app folder?

2 Answers 2

1

Create a directory with the name ssr inside /storage/app and give it permission 777, it will resolve your issue.

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

Comments

0

Create a folder inside app/ssr and there should be no space in any folder name of the path to the laravel project. I hope it will work for you.

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.