Skip to content

CLI cache bugΒ #669

@mtuchi

Description

@mtuchi

User story

I tried running this job cursor.js πŸ‘‡πŸ½

cursor($.manualCursor, { defaultValue: 'now' });

I am getting this error πŸ‘‡πŸ½

openfn jobs/uk/tmp/cursor.js -ma common -o jobs/uk/tmp/cursor.json
[CLI] ♦ Versions:
         β–Έ node.js                    18.12.1
         β–Έ cli                        1.2.0
         β–Έ @openfn/language-common    monorepo
[CLI] βœ” Loading adaptors from monorepo at /Users/openfn/Workspace/adaptors
[CLI] ⚠ Skipping auto-install as monorepo is being used
[CLI] βœ” Compiled all expressions in workflow
Setting cursor "now" to: 11:04 17 Apr 2024 (GMT+3)
[R/T] βœ” Completed step job-1 in 262ms
[CLI] βœ” Cached output written to ./cli-cache (see info logs for details)
node:internal/errors:484
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:393:5)
    at validateString (node:internal/validators:163:11)
    at Object.resolve (node:path:1098:7)
    at ensureGitIgnore (file:///Users/openfn/.asdf/installs/nodejs/18.12.1/lib/node_modules/@openfn/cli/dist/process/runner.js:49:29)
    at saveToCache (file:///Users/openfn/.asdf/installs/nodejs/18.12.1/lib/node_modules/@openfn/cli/dist/process/runner.js:66:5)
    at async notify (file:///Users/openfn/.asdf/installs/nodejs/18.12.1/lib/node_modules/@openfn/cli/dist/process/runner.js:100:13) {
  code: 'ERR_INVALID_ARG_TYPE'
}

Node.js v18.12.1

Additional Context

I have setup the always cache in my .zshrc file so that i don't have to specify --cache-steps every-time

export OPENFN_ALWAYS_CACHE_STEPS=true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Tech Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions