Comments (5)
Installing latexmk fixed the issue.
apt install latexmk
curl -H 'Content-Type: application/json' -d '{
"compile": {
"options": {
"compiler": "pdflatex",
"timeout": 40
},
"rootResourcePath": "main.tex",
"resources": [{
"path": "main.tex",
"content": "\\documentclass{article}\n\\begin{document}\nHello World\n\\end{document}"
}]
}
}' http://127.0.0.1:3013/project/5dcd0ccc7f44c800012d6ebf/compile
Response is:
{"compile":{"status":"success","error":null,"outputFiles":[{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.synctex.gz","path":"output.synctex.gz","type":"gz","build":"16e801deaaf-2904a437b06f3b11"},{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.fdb_latexmk","path":"output.fdb_latexmk","type":"fdb_latexmk","build":"16e801deaaf-2904a437b06f3b11"},{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.pdf","path":"output.pdf","type":"pdf","build":"16e801deaaf-2904a437b06f3b11"},{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.fls","path":"output.fls","type":"fls","build":"16e801deaaf-2904a437b06f3b11"},{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.log","path":"output.log","type":"log","build":"16e801deaaf-2904a437b06f3b11"},{"url":"http://localhost:3013/project/5dcd0ccc7f44c800012d6ebf/build/16e801deaaf-2904a437b06f3b11/output/output.aux","path":"output.aux","type":"aux","build":"16e801deaaf-2904a437b06f3b11"}]}}
Thank you for your help and response.
from clsi.
You forgot to specify the content type along with the json payload:
$ curl -H 'Content-Type: application/json' -d ...
from clsi.
Thanks for getting back. Added -H 'Content-Type: application/json'
and now getting the following error.
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"compileDir":"/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","mainFile":"main.tex","usesTikzExternalize":false,"usesPsTool":false,"msg":"checked for packages needing main file as output.tex","time":"2019-11-18T19:50:48.433Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"directory":"/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","compiler":"pdflatex","timeout":40000,"mainFile":"main.tex","environment":{},"flags":[],"msg":"starting compile","time":"2019-11-18T19:50:48.439Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"project_id":"5dcd0ccc7f44c800012d6ebf","command":["latexmk","-cd","-f","-jobname=output","-auxdir=/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","-outdir=/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","-synctex=1","-interaction=batchmode","-pdf","/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf/main.tex"],"directory":"/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","msg":"running command","time":"2019-11-18T19:50:48.439Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":40,"msg":"timeouts and sandboxing are not enabled with CommandRunner","time":"2019-11-18T19:50:48.440Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":50,"err":{"message":"spawn latexmk ENOENT","name":"Error","stack":"Error: spawn latexmk ENOENT\n at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)\n at onErrorNT (internal/child_process.js:415:16)\n at process._tickCallback (internal/process/next_tick.js:63:19)","info":{},"code":"ENOENT"},"project_id":"5dcd0ccc7f44c800012d6ebf","command":["latexmk","-cd","-f","-jobname=output","-auxdir=/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","-outdir=/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","-synctex=1","-interaction=batchmode","-pdf","/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf/main.tex"],"directory":"/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","msg":"error running command","time":"2019-11-18T19:50:48.450Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"code":-2,"signal":null,"project_id":"5dcd0ccc7f44c800012d6ebf","msg":"command exited","time":"2019-11-18T19:50:48.452Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"project_id":"5dcd0ccc7f44c800012d6ebf","time_taken":20,"stats":{"latexmk-errors":0,"latex-runs":0,"latex-runs-with-errors":0,"latex-runs-0":1,"latex-runs-with-errors-0":0},"timings":{"cpu-percent":0,"cpu-time":0,"sys-time":0},"loadavg":[0.001953125,0,0],"msg":"done compile","time":"2019-11-18T19:50:48.455Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":30,"args":["/root/clsi/compiles/5dcd0ccc7f44c800012d6ebf","(","-name",".cache","-o","-name",".archive","-o","-name",".project-*",")","-prune","-o","-type","f","-print"],"msg":"running find command","time":"2019-11-18T19:50:48.455Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":40,"err":{"message":"spawn latexmk ENOENT","name":"Error","stack":"Error: spawn latexmk ENOENT\n at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)\n at onErrorNT (internal/child_process.js:415:16)\n at process._tickCallback (internal/process/next_tick.js:63:19)","info":{},"code":"ENOENT"},"project_id":"5dcd0ccc7f44c800012d6ebf","msg":"error running compile","time":"2019-11-18T19:50:48.467Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":50,"req":{"url":"/project/5dcd0ccc7f44c800012d6ebf/compile","method":"POST","remote-addr":"127.0.0.1","user-agent":"curl/7.58.0","content-length":"328"},"res":{"statusCode":500},"response-time":139476,"msg":"POST /project/5dcd0ccc7f44c800012d6ebf/compile","time":"2019-11-18T19:50:48.470Z","v":0}
{"name":"clsi","hostname":"vpsxxxxx","pid":16606,"level":40,"project_id":"5dcd0ccc7f44c800012d6ebf","outputFiles":[],"msg":"project failed to compile successfully, no output.pdf generated","time":"2019-11-18T19:50:48.474Z","v":0}
_http_outgoing.js:470
throw new ERR_HTTP_HEADERS_SENT('set');
^
Error [ERR_HTTP_HEADERS_SENT]: Cannot set headers after they are sent to the client
at ServerResponse.setHeader (_http_outgoing.js:470:11)
at ServerResponse.header (/root/clsi/node_modules/express/lib/response.js:767:10)
at ServerResponse.send (/root/clsi/node_modules/express/lib/response.js:170:12)
at ServerResponse.json (/root/clsi/node_modules/express/lib/response.js:267:15)
at ServerResponse.send (/root/clsi/node_modules/express/lib/response.js:158:21)
at /root/clsi/app/js/CompileController.js:96:44
at /root/clsi/app/js/LockManager.js:70:31
at /root/clsi/node_modules/lockfile/lockfile.js:62:47
at FSReqWrap.args [as oncomplete] (fs.js:140:20)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run compile:app && node $NODE_APP_OPTIONS app.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-11-18T19_50_48_513Z-debug.log
Attaching the debug log file.
Any help in resolving the issue is appreciated. Is latexmk needed for CLSI service?
from clsi.
spawn latexmk ENOENT
texlive is not installed on your system; or not in your PATH?
the traceback is from a duplicate call of a callback #132
cc @mserranom
from clsi.
Is latexmk needed for CLSI service?
yes.
from clsi.
Related Issues (20)
- Acceptance tests fail HOT 1
- A valid Gruntfile could not be found. HOT 5
- DockerRunner performance improvement HOT 3
- Compiling on Overleaf, but using favorite Desktop IDE? HOT 2
- Support pandoc HOT 2
- Can't compile tex files containing images HOT 1
- Support custom timezones HOT 6
- how to invoke LaTeX with the -shell-escape flag HOT 1
- [email protected] install fails on [email protected] HOT 2
- qpdf not installed HOT 1
- Timeout received while compiling document HOT 2
- sqlite error: "SQLITE_BUSY: database is locked" HOT 4
- Run clsi as revice fails with 'Headers already sent' HOT 5
- LuaTeX/ConTeXt Support HOT 3
- How to bind port 3013 to external IP,such as 0.0.0.0 ? HOT 2
- Smoke tests not compiled for Docker image in ho-dockerise branch HOT 2
- Failing compiling. Wrong pointer type HOT 1
- Hack: pandoc HOT 2
- Multiple issues in dependancies install HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clsi.