New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error laravel ssr using node #23
Comments
I've experienced your issue above, so I made a change in
Removed all the Also you definitely should check this example repo provided by spatie. The only thing I couldn't get it working that is Still stuck to this issue for days. Probably it's a problem from the webpack or the way I import components. I notice that there this section of code:
In both Any help would be appreciated too. |
@josteph I made them changes to the I had a look at the example repo but when I run |
@SeanConnell93 Hmm I didn't use
And yeah that's right, the repo was able to do
It will throw an error because of either
Seriously I need more guidance to integrate SSR with this package. This package does a good job already, just those 2 points above need solution. |
If you are in a windows system set node path in your environment variable then use hope this - https://youtu.be/uO42Kpa4pvI will help |
@devsrv Yeah I was able to get the SSR in action weeks ago, thanks |
This is still relevant. I did everything like a video, but I also have this error on my project and on example too. I set in .env: Tell me please what can I do. Thank in advance |
@YuriiPlohov What error did you get? Set Note: Assuming you're on Linux environment: |
I have this error: The command "node W:\OSPanel\domains\react.local\storage\app/ssr\da43e53383efdb58ab8852e6eefaeab9.js" failed. Exit Code: 1(General error) Working directory: W:\OSPanel\domains\react.local\public Output: ================ Error Output: ================ "node" �� ���� ����७��� ��� ���譥� ��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���. (View: W:\OSPanel\domains\react.local\resources\views\welcome.blade.php) My node.js is work. I check in command prompt whether the command node -v works. Yes.It is work. But js files are not created in the folder storage/app/ssr. I am on Windows 10 |
have any solution for point 2? |
@jonathantyar There won't be one, SSR takes place in server side not client. Therefore |
I fixed on my Linux OS like this NODE_PATH=node And Got Luck |
how did you solve issue? I also have this section of code |
Dear contributor, because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it. |
@josteph did you find a solution for this? I have stumbled to isomorphic-style-loader but have no clue how to replace current style-loader in laravel-mix. |
Error |
The command "/c/Program Files/nodejs/node C:\xampp\htdocs\Agrirecruit_Laravel\storage\app/ssr\c244232e15965255150ad76e7d13d123.js" failed. Exit Code: 1(General error) Working directory: C:\xampp\htdocs\Agrirecruit_Laravel\public Output
Note: the
c244232e15965255150ad76e7d13d123.js
never gets written to thestorage/app/ssr
folderI've been stuck on the same error as this #13 for the past few days and can't figure it out.
Note: I'm using windows 10
I ran
which node
to get node pathI've set the
NODE_PATH="/c/Program Files/nodejs/node"
APP_ENV=production
Here's my files.
package.json
"dependencies": { "vee-validate": "^2.0.9", "vue": "^2.5.7", "vue-head": "^2.0.12", "vue-router": "^3.0.1", "vue-server-renderer": "^2.5.16", "vue-the-mask": "^0.11.1", "vue-wysiwyg": "^1.7.2", "vue2-editor": "^2.5.0", "vuex": "^3.0.1" }
mix
mix.js('resources/assets/js/app-client.js', 'public/js') .js('resources/assets/js/app-server.js', 'public/js') .sass('resources/assets/sass/app.scss', 'public/css') .sourceMaps().version();
Blade
<script type="text/javascript" defer src="{{ mix('js/app-client.js') }}"></script>
<main class="container-fuild" id="app"> {!! ssr("js/app-server.js")->render() !!} </main>
The I didn't change anything in the ssr.php
return [
];
Client.js
import app from './app'; app.$mount('#app');
Server.js
import app from './app'; import renderVueComponentToString from 'vue-server-renderer/basic'; renderVueComponentToString(app, (err, res) => { if (err) { throw new Error(err); } dispatch(res); });
The text was updated successfully, but these errors were encountered: