1

I have pdfjs installed running on node.js started with nohup. I am able to start node fine and port 81 is open in the firewall. As soon as I attempt to go to it in the browser it logs the following error in the nohup.out log and node.js stops. The crazy bit is that I have this working on a temporary server that was created from an image of this one to insulate the live server while a worked all this out. Now I can't seem to replicate the success I had. I can supply the code from specific files if it would be helpful, just let me know which ones.

Server running at http://mydomain.com:81/

fs.js:186
      throw new Error('Unknown file open flag: ' + flag);
            ^
Error: Unknown file open flag: rs
    at stringToFlags (fs.js:186:13)
    at Object.open (fs.js:224:44)
    at new <anonymous> (fs.js:1062:6)
    at Object.createReadStream (fs.js:1010:10)
    at serveRequestedFile (/var/path/to/tools/pdfjs/test/webserver.js:211:23)
    at Object.statFile [as oncomplete] (/var/path/to/tools/pdfjs/test/webserver.js:157:7)
2
  • Same version of node.js on the two servers? Commented Jul 13, 2014 at 23:05
  • yes, it is the same version. Commented Jul 13, 2014 at 23:12

1 Answer 1

1

Solved: Reinstalling node.js was the solution. If people encounter this error, it is likely that node either isn't installed or wasn't installed successfully. Try installing/reinstalling to correct.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.