Closed youngcademy closed 7 years ago
@minyoungk This is not a library issue. Like you said this is permissions on the server preventing you from either reading the PDF files or writing the temporary PDF file. Your user on the server needs permission.
I have a source below.
and Error souce is below.
/var/app/current/lib/pdftk-bin/vendor/linux/x64/pdftk ================= tempDir START /tmp/117213-448-1y9pd1q ================= tempDir END ================= files START [ '/tmp/117213-448-1y9pd1q/79953eb0-d5ba-40d7-9573-e10ba95124e5-1489414415284564.pdf' ] ================= files END ================= pdftkPath START /var/app/current/lib/pdftk-bin/vendor/linux/x64/pdftk ================= pdftkPath END ================= pdfMerge START PDFMerge { pdftkPath: '/var/app/current/lib/pdftk-bin/vendor/linux/x64/pdftk', pdfFiles: [ '/tmp/117213-448-1y9pd1q/79953eb0-d5ba-40d7-9573-e10ba95124e5-1489414415284564.pdf' ], tmpFilePath: '/tmp/tmp-448OUXMeYzqqGDc', execArgs: [ '\'/tmp/117213-448-1y9pd1q/79953eb0-d5ba-40d7-9573-e10ba95124e5-1489414415284564.pdf\'', 'cat', 'output', '/tmp/tmp-448OUXMeYzqqGDc' ], mode: 'BUFFER', keepTmpFile: false } ================= pdfMerge END Unhandled rejection Error: spawn EACCES at exports._errnoException (util.js:870:11) at ChildProcess.spawn (internal/child_process.js:298:11) at exports.spawn (child_process.js:362:9) at Object.exports.execFile (child_process.js:151:15) at PDFMerge.merge (/var/app/current/node_modules/pdf-merge/lib/PdfMerge.js:143:9) at PDFMerge.promise (/var/app/current/node_modules/pdf-merge/lib/PdfMerge.js:120:7) at /var/app/current/actions/stock/unstoring.js:718:16 at tryCatcher (/var/app/current/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/var/app/current/node_modules/bluebird/js/release/promise.js:512:31) at Promise._settlePromise (/var/app/current/node_modules/bluebird/js/release/promise.js:569:18) at Promise._settlePromise0 (/var/app/current/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/var/app/current/node_modules/bluebird/js/release/promise.js:693:18) at Promise._fulfill (/var/app/current/node_modules/bluebird/js/release/promise.js:638:18) at PromiseArray._resolve (/var/app/current/node_modules/bluebird/js/release/promise_array.js:126:19) at PromiseArray._promiseFulfilled (/var/app/current/node_modules/bluebird/js/release/promise_array.js:144:14) at Promise._settlePromise (/var/app/current/node_modules/bluebird/js/release/promise.js:574:26) at Promise._settlePromise0 (/var/app/current/node_modules/bluebird/js/release/promise.js:614:10) at Promise._settlePromises (/var/app/current/node_modules/bluebird/js/release/promise.js:693:18) at Async._drainQueue (/var/app/current/node_modules/bluebird/js/release/async.js:133:16) at Async._drainQueues (/var/app/current/node_modules/bluebird/js/release/async.js:143:10) at Immediate.Async.drainQueues [as _onImmediate] (/var/app/current/node_modules/bluebird/js/release/async.js:17:14) at processImmediate [as _immediateCallback] (timers.js:383:17)
That source run correctly in windows.
I think that issue is about permission.
But I don't know how can I resolove this issue?