Skip to content

Appwrite cli can't resolve symlinks #253

@aandrosov-freelancer

Description

@aandrosov-freelancer

👟 Reproduction steps

Pointing to threads in our community you can share code using symlinks and then Appwrite cli resolve symlinks automatically.

I have created a simple example of symlink usage: https://github.com/aandrosov-freelancer/appwrite-code-sharing-functions-example

You can copy it and run signup function locally using Appwrite CLI

👍 Expected behavior

Appwrite cli resolves symlinks and function works well and see common directory

👎 Actual Behavior

Appwrite cli throws exception:

/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:80046
      throw new Ctor(message);
            ^

RangeError: path should be a `path.relative()`d string, but got "../common"
    at throwError (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:80046:13)
    at checkPath (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:80060:16)
    at Ignore._test (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:80098:9)
    at Ignore.ignores (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:80144:21)
    at ignored (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:139926:24)
    at matchPatterns (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:83494:22)
    at FSWatcher._userIgnored (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:83512:18)
    at FSWatcher._isIgnored (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:86621:21)
    at FsEventsHandler._handleFsEventsSymlink (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:85900:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
Emitted 'error' event on FSWatcher instance at:
    at FSWatcher._handleError (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:86510:16)
    at FsEventsHandler._handleFsEventsSymlink (/opt/homebrew/Cellar/appwrite/13.3.0/libexec/lib/node_modules/appwrite-cli/dist/cli.cjs:85914:24)
    at process.processTicksAndRejections (node:internal/process/task_queues:104:5)

Node.js v25.6.0

🎲 Appwrite version

Version 1.8.x

💻 Operating system

MacOS

🧱 Your Environment

Appwrite CLI version: 13.3.0

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions