GENL / matice

Use your Laravel translations in JavaScript.
MIT License
98 stars 14 forks source link

Failed to open stream: No such file or directory - only on server #25

Closed pmochine closed 3 years ago

pmochine commented 3 years ago

file_put_contents(/var/www/staging/releases/13/resources/assets/js/matice_translations.js): Failed to open stream: No such file or directory (View: /var/www/staging/releases/13/resources/views/layouts/head.blade.php)

Do you have perhaps any idea why I'm not able to use it on my server? I get the above error. On my local machine, everything works fine 😅

I'm unfortunately on a hurray but I'm going to dig deeper into what the problem is. Maybe you are faster :D

GENL commented 3 years ago

Hi! upgrade to v1.6

pmochine commented 3 years ago

@GENL Hey thanks for the fast answer. Sorry for not answering before, I have the 1.1.6 version installed. But I'm going to check tomorrow.

pmochine commented 3 years ago

@GENL okay digging deeper. I think it's a permission issue? Because the problem only happens when the app is set to production.

That means it fails at Artisan::call('matice:generate');

Let's see why, because when I call it manually everything works fine.

Besides that, doesn't it make more sense to set the

'generate_translations_path' => resource_path('assets/js/matice_translations.js'), to 'generate_translations_path' => public_path('js/matice_translations.js'), ?

pmochine commented 3 years ago

I'm closing this issue because it has nothing to do with your package. Thank you for your help. And if you are perhaps good in server permissions, I would be happy to read your reply here: https://serverfault.com/questions/1073629/permission-denied-for-www-data-users-how-to-fix-permission-even-though-it-is-i