Skip to content

stack.replace is not a function #48

@rkistner

Description

@rkistner

It is likely that my auth token is invalid and/or the project does not exist, but this error makes it difficult to see what is wrong:

powersync link cloud --project-id 64cb98f601c335000798fadd
{}
TypeError: stack.replace is not a function
    at module.exports (/home/ralf/tmp/powersync-cli-test/node_modules/clean-stack/index.js:12:15)
    at handle (/home/ralf/tmp/powersync-cli-test/node_modules/@oclif/core/lib/errors/handle.js:34:49)
    at /home/ralf/tmp/powersync-cli-test/node_modules/@oclif/core/lib/execute.js:60:53
    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
    at async file:///home/ralf/tmp/powersync-cli-test/node_modules/powersync/bin/run.js:12:1

Update: With further debugging, this is the error received:

{"status":500,"code":"INTERNAL_SERVER_ERROR","description":"Something went wrong","details":"Resource does not exist","stack":{},"name":"JourneyError"}

So stack is an empty object, but clean-stack treats it as a string, which then fails like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions