Error when using handlerbar and phantomjs on
-
The entire error is as follows:
I have checked the existence of the files and they all the node_modules and executables existError occured - Error during rendering report: Command failed: C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\Users\Ketan\AppData\Local\Temp\jsreport-temp\93113860-1655-11e7-95eb-b92d55346f4asettings.html Can't open 'C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js' Stak - Error: Command failed: C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\Users\Ketan\AppData\Local\Temp\jsreport-temp\93113860-1655-11e7-95eb-b92d55346f4asettings.html Can't open 'C:\WINDOWS\System32\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js' at ChildProcess.exithandler (child_process.js:205:12) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:194:7) at maybeClose (internal/child_process.js:899:16) at Socket. (internal/child_process.js:342:11) at emitOne (events.js:96:13) at Socket.emit (events.js:191:7) at Pipe._handle.close [as _onclose] (net.js:513:12)
-
@ketank maybe the file can't be open because it requires administrative privileges to acces your
C:\WINDOWS\System32
folder, can you please try to move your project outsideC:\WINDOWS\System32
and install your dependencies again from an command line with administrative privileges?
-
Thanks for the prompt response. My server is running under node command prompt opened with administrator privilages so I think that may not be an issue but I will try your solution.
-
I'm having this same problem, how did you resolve this issue?
-
Please help when I ruin the invoice report all I get is this.
I've even added everyone permission with full control and it's the same.Error occured - Error during rendering report: Command failed: C:\windows\system32\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\windows\system32\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\windows\TEMP\jsreport-temp\e7108820-a3c3-11e7-bda7-f52f1422f5fasettings.html
Can't open 'C:\windows\system32\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js'Stak - Error: Command failed: C:\windows\system32\node_modules\phantomjs\lib\phantom\phantomjs.exe --ignore-ssl-errors=yes --web-security=false --ssl-protocol=any C:\windows\system32\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js C:\windows\TEMP\jsreport-temp\e7108820-a3c3-11e7-bda7-f52f1422f5fasettings.html
Can't open 'C:\windows\system32\node_modules\jsreport-phantom-pdf\node_modules\phantom-html-to-pdf\lib\scripts\standaloneScript.js'at ChildProcess.exithandler (child_process.js:205:12) at emitTwo (events.js:106:13) at ChildProcess.emit (events.js:194:7) at maybeClose (internal/child_process.js:899:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
From previous event:
at C:\windows\system32\node_modules\jsreport-phantom-pdf\lib\phantom.js:203:41
From previous event:
at Phantom.execute (C:\windows\system32\node_modules\jsreport-phantom-pdf\lib\phantom.js:202:6)
at C:\windows\system32\node_modules\jsreport-core\lib\render\render.js:117:23
From previous event:
at invokeRender (C:\windows\system32\node_modules\jsreport-core\lib\render\render.js:102:6)
at C:\windows\system32\node_modules\jsreport-core\lib\render\render.js:146:12
at runCallback (timers.js:672:20)
at tryOnImmediate (timers.js:645:5)
at processImmediate [as _immediateCallback] (timers.js:617:5)
-
@Carl-Blanchard my first guess is that again this is a permission issue. have you tried my previous suggestion? i mean -> trying to move your project outside
C:\WINDOWS\System32
and install your dependencies again from an command line with administrative privileges.C:\WINDOWS\System32
is very privileged folder so it would be tricky for you to find the correct set of permissions that jsreport process need to work correctly.when i'm on a windows machine i usually run jsreport in another partition (like
D:\
) or at least in another new folder inC
(likeC:\jsreport-app
) to avoid these kind of problems. so far it has worked very well and i never experienced these kind of issues, so probably doing the same will work for you too.
-
Thank for your response. The issue is I installed via NPM, therefore it just done and installed to default locations.
I'm unsure of how to change the paths before installing.
-
according to your previous comment it seems that by default on your computer everything is installed in
C:\WINDOWS\System32
.it makes me think that you are doing the following steps to install jsreport:
- open command line
- current working directory of command line by default is set to
C:\WINDOWS\System32
- without changing the current working directory of command line you executed
npm install jsreport --save
(orjsreport init
) - after that all jsreport plugins and files are installing in
C:\WINDOWS\System32\node_modules
the wrong thing in the previous steps is not changing the current working directory of the command line to somewhere else (like C:\jsreport-app).
did you do the same steps? if not, please try to add more detail of the steps that you are following.
-
Easy when you know how. Thanks, that's worked great.
It's amazing how something so simple, can be so annoying, it's taken me ages lol