Skip to content

NPM overwrites $TMPDIR #134

Description

@craigsketchley

Strangely, NPM overwrites the TMPDIR environment variable (and therefore the result of os.tmpDir()) to the current working directory. This means when running node-lambda deploy as a NPM script in package.json, it fails on the rsync step as the destination directory exists in the folder you're synchronising (causing heaps of file has vanished: type errors).

I can fix this by explicitly setting the TMPDIR variable as I deploy, something like:

  "scripts": {
    "deploy-stage": "TMPDIR=/tmp node-lambda deploy"
  }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions