Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ags resolves relative imports based on the reolved symlink path to app.ts #681

Open
upidapi opened this issue Feb 16, 2025 · 0 comments
Open

Comments

@upidapi
Copy link

upidapi commented Feb 16, 2025

Currently the relative imports are based on the resolved path of the app.ts file. So if i run "ags run /tmp/sym-ags" if /tmp/sym-ags/app.ts is a symlink to tmp/ags/app.ts. Then the relative imports will be based on "tmp/ags" insted of "tmp/sym-ags"

Code to replicate the issue.

ags init -d /tmp/ags
mkdir /tmp/sym-ags -p
ln -s /tmp/ags/app.ts /tmp/sym-ags/app.ts
ags run -d /tmp/sym-ags

If the relative import path where to be based on the dir run then it would insted have shown an error since it tries to import files that arent in the /tmp/ags-sym" folder

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant