{"id":15962808,"url":"https://github.com/ejnshtein/resolve-symlinks","last_synced_at":"2026-05-05T19:31:48.825Z","repository":{"id":93430719,"uuid":"505444795","full_name":"ejnshtein/resolve-symlinks","owner":"ejnshtein","description":"Resolve issues with locally installed packages","archived":false,"fork":false,"pushed_at":"2022-06-20T21:22:04.000Z","size":329,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T11:31:01.734Z","etag":null,"topics":["cli","development","nodejs","npm","yarn"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/resolve-symlinks","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ejnshtein.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-20T13:05:48.000Z","updated_at":"2023-03-09T08:31:53.000Z","dependencies_parsed_at":"2023-03-13T17:18:24.694Z","dependency_job_id":null,"html_url":"https://github.com/ejnshtein/resolve-symlinks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ejnshtein/resolve-symlinks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Fresolve-symlinks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Fresolve-symlinks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Fresolve-symlinks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Fresolve-symlinks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejnshtein","download_url":"https://codeload.github.com/ejnshtein/resolve-symlinks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejnshtein%2Fresolve-symlinks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32664803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","development","nodejs","npm","yarn"],"created_at":"2024-10-07T16:20:43.369Z","updated_at":"2026-05-05T19:31:48.808Z","avatar_url":"https://github.com/ejnshtein.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# resolve-symlinks\n\n## Usage\n\n```bash\nnpx resolve-symlinks\n```\n\n## Why this exists\n\nWhen you install package using npm/yarn locally (`npm i ./path/to/package`) it actually links your package to **.config/yarn/link/\\\u003cpackage-name\u003e** first, and only then to your **node_modules** folder.\n\nSo, if you have 2 folders with locally installed packages with the same name in **package.json**, the first package you install will be linked to global directory, second one will use link from first package.\n\nThe following diagram might help understanding the situation:\n\n![](./assets/resolve-symlinks-diagram.png)\n\nBecause of that your dev-servers might not work as expected (reload on safe) since your are saving files in one project, while the package is actually linked to other directory.\n\n## How it works\n\nThe whole source code is about 200 lines of code, when it runs it does the following things:  \n1. Checks if **package.json** even exists. Exits if it does not.\n2. Loads data from **package.json**. Checks if **dependencies** field exists and is of type **object**. Exits if it is not.\n3. Checks if **node_modules** exists. If they do not exist, runs a prompt to install dependencies using `npm i` command. (can be changed later)\n4. Filters dependencies to process only locally installed ones.\n5. Checks if packages exists. If they do not, exits.\n6. Checks if packages exists in **node_modules** folder. If they do not, exits.\n7. Loads real paths of locally installed dependencies.\n8. Filters dependencies to process only those which are installed from incorrect path. Aka, the whole idea of this package.\n9. If there are any, logs them in the console and prompts to fix them.  \nIf you want to fix them, this package will do the following:  \n1. Unlink package from **./config/yarn/link/\\\u003cpackage-name\u003e**.  \n2. Unlink package from **node_modules**.  \n3. Link package into **./config/yarn/link/\\\u003cpackage-name\u003e**  \n4. Link global package into **node_modules/\\\u003cpackage-name\u003e**  \nIf not, will end the process.\n\nThat is it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejnshtein%2Fresolve-symlinks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejnshtein%2Fresolve-symlinks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejnshtein%2Fresolve-symlinks/lists"}