GithubHelp home page GithubHelp logo

Comments (3)

danmactough avatar danmactough commented on June 27, 2024 4

We also experienced this error when trying to use this library in Lambda function on AWS. The reason is that openssl tries to create a file .rnd containing that random state to your HOME directory, which you don't have write access to in the Lambda environment.

Our solution was to monkey patch lib/pass.js at build time to rewrite Line 362:

-  var sign = execFile("openssl", args, { stdio: "pipe" }, function(error, stdout, stderr) {
+  var sign = execFile("openssl", args, { stdio: "pipe", env: { HOME: tmpdir } }, function(error, stdout, stderr) {

tmpdir was a directory we created at build time.

from node-passbook.

timoweiss avatar timoweiss commented on June 27, 2024 2

@danmactough good catch! @albatarnik:
You can also set your HOME environment variable before creating your pass.
process.env.HOME = yourTempDir;

Note: you might want to reset the environment variable again after pass creation.

from node-passbook.

sharath-yml avatar sharath-yml commented on June 27, 2024

@timoweiss We had the same issue while trying to run the node server as daemon using upstart or forever-service. This should be put somewhere in the Readme, because many people may end up having this issue trying to use it on production.

from node-passbook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.