{"action":"created","issue":{"url":"https://api.github.com/repos/pnpm/pnpm/issues/2124","repository_url":"https://api.github.com/repos/pnpm/pnpm","labels_url":"https://api.github.com/repos/pnpm/pnpm/issues/2124/labels{/name}","comments_url":"https://api.github.com/repos/pnpm/pnpm/issues/2124/comments","events_url":"https://api.github.com/repos/pnpm/pnpm/issues/2124/events","html_url":"https://github.com/pnpm/pnpm/issues/2124","id":514326268,"node_id":"MDU6SXNzdWU1MTQzMjYyNjg=","number":2124,"title":"Windows - PNPM store (.pnpm/registry.npmjs.org) is recreated in project folder (and junctions link to it) instead of the global store","user":{"login":"gituboi30","id":34110559,"node_id":"MDQ6VXNlcjM0MTEwNTU5","avatar_url":"https://avatars2.githubusercontent.com/u/34110559?v=4","gravatar_id":"","url":"https://api.github.com/users/gituboi30","html_url":"https://github.com/gituboi30","followers_url":"https://api.github.com/users/gituboi30/followers","following_url":"https://api.github.com/users/gituboi30/following{/other_user}","gists_url":"https://api.github.com/users/gituboi30/gists{/gist_id}","starred_url":"https://api.github.com/users/gituboi30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gituboi30/subscriptions","organizations_url":"https://api.github.com/users/gituboi30/orgs","repos_url":"https://api.github.com/users/gituboi30/repos","events_url":"https://api.github.com/users/gituboi30/events{/privacy}","received_events_url":"https://api.github.com/users/gituboi30/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-10-30T01:02:06Z","updated_at":"2019-10-30T11:45:42Z","closed_at":null,"author_association":"NONE","body":"<!--\r\n**Please only file bugs/feature requests for pnpm here.**\r\n\r\nIf you have a question that is not answered in the FAQ section of the README\r\nthen it is best to post your question on StackOverflow under the pnpm tag:\r\nhttps://stackoverflow.com/questions/tagged/pnpm\r\nor ask it in our Gitter chatroom:\r\nhttps://gitter.im/pnpm/pnpm\r\n\r\nIf your issue is a bug, please follow the format below:\r\n-->\r\n\r\nInstalling project dependencies with PNPM results in the project folder `node_modules/` containing junctions with incorrect paths that link to a duplicated store (also in the project folder).\r\n\r\nIt would be nice to have the correct paths for the junctions so as to help preserve disk space effectively. The duplicate PNPM stores take up extra memory (checked directly in properties of `C:` drive).\r\n\r\n### pnpm version: 4.1.6\r\n\r\n### Code to reproduce the issue:\r\n\r\n(Git Bash terminal; inside the project folder)\r\n```\r\n# Set up global store path beforehand (double backslash to output escaped characters properly)\r\nnpm config set store C:\\\\Users\\\\[my_username]\\\\.pnpm-store\r\nnpm config set -g store C:\\\\Users\\\\[my_username]\\\\.pnpm-store\r\n\r\n# Install dependencies in local project folder (like the global store, the project is inside the path \"~\")\r\npnpm install\r\n\r\n# Prints out \"/c/Users/[my-username]\"\r\ncd ~\r\npwd\r\n```\r\n\r\n<!--\r\nIf there was a fatal error also include a gist of your pnpm-debug.log file.\r\n-->\r\n\r\n### Expected behavior:\r\n\r\n- [ ] Path `[project-path]\\node_modules\\` should contain junctions that link to the installations of the dependencies in the global PNPM store. \r\n\r\n- [ ] No duplicate store in `[project-path]\\node_modules\\.pnpm\\registry.npmjs.org\\` should be created.\r\n\r\n- [ ] Running `pnpm store usages [dependency-name]` should correctly show that the dependency is used in project(s).\r\n\r\n- [X] Dependencies are usable without issues.\r\n\r\n- [X] `store.json` in global store is updated with dependencies (and a list of projects they are used in for each of them).\r\n\r\n### Actual behavior:\r\n\r\n- Junctions in path `[project-path]\\node_modules\\` link to redundantly installed copies of the dependencies in path `[project-path]\\node_modules\\.pnpm\\registry.npmjs.org\\` (checked using terminal command `ls -al`).\r\n\r\n- A duplicate store in `[project-path]\\node_modules\\.pnpm\\registry.npmjs.org\\` should be created. There is also a folder `[project-path]\\node_modules\\.pnpm\\` with more junctions that link to the duplicate store.\r\n\r\n- Running `pnpm store usages [dependency-name]` outputs nothing.\r\n\r\n- Dependencies are usable without issues.\r\n\r\n- `store.json` in global store is updated with dependencies (and a list of projects they are used in for each of them).\r\n\r\n### Additional information:\r\n\r\n - `node -v` prints: **v10.17.0**\r\n - Windows, OS X, or Linux?: **Windows**\r\n\r\nThe actual behavior is the same with and without the NPM configuration entry for the store path."},"comment":{"url":"https://api.github.com/repos/pnpm/pnpm/issues/comments/547862740","html_url":"https://github.com/pnpm/pnpm/issues/2124#issuecomment-547862740","issue_url":"https://api.github.com/repos/pnpm/pnpm/issues/2124","id":547862740,"node_id":"MDEyOklzc3VlQ29tbWVudDU0Nzg2Mjc0MA==","user":{"login":"gituboi30","id":34110559,"node_id":"MDQ6VXNlcjM0MTEwNTU5","avatar_url":"https://avatars2.githubusercontent.com/u/34110559?v=4","gravatar_id":"","url":"https://api.github.com/users/gituboi30","html_url":"https://github.com/gituboi30","followers_url":"https://api.github.com/users/gituboi30/followers","following_url":"https://api.github.com/users/gituboi30/following{/other_user}","gists_url":"https://api.github.com/users/gituboi30/gists{/gist_id}","starred_url":"https://api.github.com/users/gituboi30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gituboi30/subscriptions","organizations_url":"https://api.github.com/users/gituboi30/orgs","repos_url":"https://api.github.com/users/gituboi30/repos","events_url":"https://api.github.com/users/gituboi30/events{/privacy}","received_events_url":"https://api.github.com/users/gituboi30/received_events","type":"User","site_admin":false},"created_at":"2019-10-30T11:45:42Z","updated_at":"2019-10-30T11:45:42Z","author_association":"NONE","body":"> Those files are hard links.\r\n\r\nThey are not supposed to be junctions in Windows anymore [as per the FAQ's](https://pnpm.js.org/en/faq#does-it-work-on-windows-it-is-harder-to-create-symlinks-on-windows)?\r\n\r\n> The files in node_modules/.pnpm are not copies of the packages from the global store. \r\n\r\nThought so as well at first, but a quick `dir` inside of the local project's `node_modules` directory showed a junction leading to the duplicated store (not the one from the global `.pnpm-store`).\r\n\r\n![junction-to-local](https://user-images.githubusercontent.com/34110559/67853429-29095900-fad4-11e9-8386-441e153655bd.JPG)\r\n\r\nAnd in the project's local `.pnpm` directory, all folders are marked as directories (no junctions).\r\n\r\n![not-a-junction](https://user-images.githubusercontent.com/34110559/67853530-59e98e00-fad4-11e9-9aba-21abad344071.JPG)\r\n\r\nIn case it will provide further insight, this is the full tree for the local `node_modules` directory (took some time to check each subdirectory - thankfully, only `axios` is installed for this sample project - no junctions that lead outside the local `node_modules` directory exist):\r\n\r\n![full-tree](https://user-images.githubusercontent.com/34110559/67853968-20655280-fad5-11e9-8f72-21715afcb276.JPG)\r\n\r\nAs seen in the second image, the `registry.npmjs.org` directory is a duplicated folder, not a junction."}}
{"actor":{"display_login":"gituboi30"}}