Anybody can help me. Exit Code: 127(Command not found) #802
Unanswered
yogi-satya
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The command "PATH=$PATH:/usr/bin:/www/server/nodejs/v16.20.2/bin NODE_PATH='/www/server/nodejs/v16.20.2/lib/node_modules/' /usr/bin/node '/www/wwwroot/eraport.pratiwischool.com/vendor/spatie/browsershot/src/../bin/browser.cjs' '{"url":"file:///tmp/499184860-0948508001702634825/index.html","action":"pdf","options":{"args":[],"viewport":{"width":800,"height":600},"displayHeaderFooter":true,"width":"210mm","height":"297mm","margin":{"top":"45mm","right":"15mm","bottom":"15mm","left":"15mm"},"headerTemplate":"\n<!doctype html>\n\n\n\n\t<meta charset="utf-8">\n\t<script>\n\t\tfunction substitutePdfVariables() {\n\n\t\t\tfunction getParameterByName(name) {\n\t\t\t\tvar match = RegExp('''[?&]''' + name + '''=([^&]*)''').exec(window.location.search);\n\t\t\t\treturn match && decodeURIComponent(match[1].replace(/\+/g, ''' '''));\n\t\t\t}\n\n\t\t\tfunction substitute(name) {\n\t\t\t\tvar value = getParameterByName(name);\n\t\t\t\tvar elements = document.getElementsByClassName(name);\n\n\t\t\t\tfor (var i = 0; elements && i < elements.length; i++) {\n\t\t\t\t\telements[i].textContent = value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t['''frompage''', '''topage''', '''page''', '''webpage''', '''section''', '''subsection''', '''subsubsection''']\n\t\t\t.forEach(function(param) {\n\t\t\t\tsubstitute(param);\n\t\t\t});\n\t\t}\n\t</script>\n\n\t<style>\n\t\t.table-vcenter td {\n\t\t\tvertical-align: middle;\n\t\t}\n\t</style>\n</head>\n\n\n<body style="margin: 0 !important;padding: 0 !important;" onload="substitutePdfVariables()">\n\t<div style="margin-bottom: 13.8pt;">\n\t\t<table class="table-vcenter td" style="width: 100%;text-wrap: nowrap;font-size: 12pt;border-bottom: 1px solid black;">\n\t\t\t<tr style="line-height: 13.8pt;">\n\t\t\t\t<td style="width: 15%;text-align:left;">\n\t\t\t\t\t\t\t\t\t\t\t.......'" failed.
Exit Code: 127(Command not found)
my code :
Browsershot::html($view_report)
->setNodeBinary('/usr/bin/node')
->setNpmBinary('/usr/bin/npm')
->setIncludePath('$PATH:/usr/bin:/www/server/nodejs/v16.20.2/bin')
->setNodeModulePath("/www/server/nodejs/v16.20.2/lib/node_modules/")
->paperSize($page_size[0], $page_size[1])
->margins(45, 15, 15, 15)
->showBrowserHeaderAndFooter()
->headerHtml(view('report/component/Header', $data))
->footerHtml(view('report/component/Footer', $data))
->pdf();
Beta Was this translation helpful? Give feedback.
All reactions