question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Lambda - cannot find user home directory to store configuration files

See original GitHub issue

trying to get a lambda function up and running but am running into an error just importing it into a file (not even using or calling the library) here is the error

{
    "errorType": "Error",
    "errorMessage": "cannot find user home directory to store configuration files",
    "stack": [
        "Error: cannot find user home directory to store configuration files",
        "    at getDefaultConfigFilePath (/var/task/node_modules/jsforce/lib/registry/file.js:42:11)",
        "    at new FileRegistry (/var/task/node_modules/jsforce/lib/registry/file.js:64:47)",
        "    at Object.<anonymous> (/var/task/node_modules/jsforce/lib/registry/index.js:47:98)",
        "    at Module._compile (internal/modules/cjs/loader.js:956:30)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)",
        "    at Module.load (internal/modules/cjs/loader.js:812:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:724:14)",
        "    at Module.require (internal/modules/cjs/loader.js:849:19)",
        "    at require (internal/modules/cjs/helpers.js:74:18)",
        "    at Object.<anonymous> (/var/task/node_modules/jsforce/lib/jsforce.js:38:40)"
    ]
}

i understand the cli saves to ~/.jsforce/config.json, but that doesn’t seem to be required for non-cli usage. is there anyway to override this check?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6

github_iconTop GitHub Comments

5reactions
dylandechantcommented, Jan 7, 2020

solved:

to fix this add an environment variable to your lambda function that points it to /tmp HOME=/tmp

3reactions
mayrbenjamin92commented, Jun 24, 2020

This might not be the solution for all users of this module! The default should actually be something in the “node_modules” folder itself. What if I can’t set an ENV variable?

Read more comments on GitHub >

github_iconTop Results From Across the Web

cannot find user home directory to store configuration files
trying to get a lambda function up and running but am running into an error just importing it into a file (not even...
Read more >
Configuring file system access for Lambda functions
Configuring file system access with the Lambda API​​ To connect a function to a file system, use the update-function-configuration command. The following example ......
Read more >
Lambda can't find modules from outer folders when deployed ...
I tried copying node_modules folder and other files (which were outside the folder get-users ) to the folder get-users and it worked perfectly....
Read more >
Aws environment variables - Kommune Korax e.V.
Type AWS Lambda in search bar and click on the first result. ... The following variables are reserved and cannot be set in...
Read more >
Agent Configuration Files - Datadog Docs
Autodiscovery template files are stored in the configuration folder with the auto_conf.yaml file. For example, for the Redis check, here is the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found