Limenius / symfony-react-sandbox

Example of integration with React and Webpack (Webpack Encore) for universal (isomorphic) React rendering, using Limenius/ReactBundle and Limenius/LiformBundle
MIT License
337 stars 77 forks source link

nacmartin/phpexecjs #8

Closed hounded closed 8 years ago

hounded commented 8 years ago

I have read the docs on nacmartin/phpexecjs site,

I couldn't get v8js running as an extension on wamp, however the EXternalRuntime doesn't seem to fire either

as the system is still crashing with

An exception has been thrown during the rendering of a template ("PhpExecJs: Cannot autodetect any JavaScript runtime") in recipe\home.html.twig at line 4. 
bartosz-malec commented 8 years ago

I have the same problem. Anyone can help?

nacmartin commented 8 years ago

Mmm. I'll have a look at it. It looks like phpexecjs can't find node.exe. I will have to install Windows first, though.

bartosz-malec commented 8 years ago

Yes it's true. i found solution. Tomorrow I will send pull request.

nacmartin commented 8 years ago

Nice! Thanks! Note that there is an ongoing PR for this exact issue: https://github.com/nacmartin/phpexecjs/pull/3/files

I looked at it, but

  1. I have to install windows first and I have had two quite busy weeks.
  2. I don't like that it tries to look for the binary node.exe in addition to node as if it was a separate engine. If we add more runners (spidermonkey, ...) then every runner will have to be duplicated with .exe added. Ideally, it should detect if it is running in Windows and try to find the binary with .exe or some other way particular to Windows.
bartosz-malec commented 8 years ago

This is exactly the same what I did. I've added node.exe to Runtimer autodetector and changed findBinaryPath method.

nacmartin commented 8 years ago

@bartosz-malec any progress with the PR?

ahsanwtc commented 8 years ago

getting the same error. Any fix?

nacmartin commented 8 years ago

Ok, this should be fixed now by https://github.com/nacmartin/phpexecjs/commit/4b95e346f589d5e67bd4ce15cec73ae50eb40a16

cAstraea commented 8 years ago

Having a similar problem I think ? Not sure why it wants to run phpexecjs from AppData\Local\Temp

getting

An exception has been thrown during the rendering of a template ("The exit status code '1' says something went wrong: stderr: "'C:\Program' is not recognized as an internal or external command, operable program or batch file. " stdout: "" command: C:\Program Files\nodejs\node.exe C:\Users\Razva\AppData\Local\Temp\nacmartin_phpexecjs57e39ce961d449.83094437.js.") in recipe\home.html.twig at line 4

nacmartin commented 8 years ago

For the sake of reporting, this should have been fixed by https://github.com/nacmartin/phpexecjs/pull/7