The exec function callback has error, stdout and stderr arguments passed to it. See if they can help you diagnose the problem by spitting them out to the console:
exec('~/./play.sh /media/external/' + req.params.movie,
function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
}
});
Related Contents:
- Node.js app can’t run on port 80 even though there’s no other process blocking the port
- How do I pass command line arguments to a Node.js program?
- “SyntaxError: Unexpected token < in JSON at position 0"
- Meaning of “this” in node.js modules and functions
- Issue in returning data retrieved from DB queries called in the loop
- parseInt vs unary plus, when to use which?
- Read environment variables in Node.js
- Node.js global variables
- Const in JavaScript: when to use it and is it necessary?
- Correct way to write loops for promise.
- Mocha / Chai expect.to.throw not catching thrown errors
- Fetch error when building Next.js static website in production
- Sequelize model association won’t create a new column
- How can I share code between Node.js and the browser?
- Best way to call an asynchronous function within map?
- Origin is not allowed by Access-Control-Allow-Origin
- ECMAScript 6 features available in Node.js 0.12
- internal/modules/cjs/loader.js:582 throw err
- Puppeteer – scroll down until you can’t anymore
- webpack dynamic module loader by require
- Handling errors in express async middleware
- Limit concurrency of promise being run
- Mongoose find/update subdocument
- Nodejs express and promises not doing what I expect
- Discord bot on Heroku throws an error: agent ??= new https.Agent
- How to run user-submitted scripts securely in a node.js sandbox?
- How to count the correct length of a string with emojis in javascript?
- Exporting Node module from promise result
- UnhandledPromiseRejectionWarning: MongooseServerSelectionError
- puppeteer: wait N seconds before continuing to the next line
- JavaScript require() on client side
- How to use timezone offset in Nodejs?
- How can I write a test which expects an ‘Error’ to be thrown in Jasmine?
- Node.js server that accepts POST requests
- How to send flash messages in Express 4.0?
- Angular 2 – How to pass URL parameters?
- Limit concurrency of pending promises
- Uncaught (in promise) TypeError: Failed to fetch and Cors error
- How to include javascript on client side of node.js?
- Serial port not working?
- Sending message to a specific connected users using webSocket?
- When to close MongoDB database connection in Nodejs
- ER_NOT_SUPPORTED_AUTH_MODE – MySQL server
- Inserting and Querying Date with MongoDB and Nodejs
- A plain JavaScript way to decode HTML entities, works on both browsers and Node
- How to get updated document back from the findOneAndUpdate method?
- Node: Downloading a zip through Request, Zip being corrupted
- setPresence activity type in discord.js v14 can only be set to “PLAYING”
- Update all clients using Socket.io?
- MissingSchemaError: Schema hasn’t been registered for model “User”