{"action":"closed","issue":{"url":"https://api.github.com/repos/prettier/prettier/issues/6915","repository_url":"https://api.github.com/repos/prettier/prettier","labels_url":"https://api.github.com/repos/prettier/prettier/issues/6915/labels{/name}","comments_url":"https://api.github.com/repos/prettier/prettier/issues/6915/comments","events_url":"https://api.github.com/repos/prettier/prettier/issues/6915/events","html_url":"https://github.com/prettier/prettier/issues/6915","id":520621460,"node_id":"MDU6SXNzdWU1MjA2MjE0NjA=","number":6915,"title":"`yarn add` installs bad version","user":{"login":"Skalman","id":138395,"node_id":"MDQ6VXNlcjEzODM5NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/138395?v=4","gravatar_id":"","url":"https://api.github.com/users/Skalman","html_url":"https://github.com/Skalman","followers_url":"https://api.github.com/users/Skalman/followers","following_url":"https://api.github.com/users/Skalman/following{/other_user}","gists_url":"https://api.github.com/users/Skalman/gists{/gist_id}","starred_url":"https://api.github.com/users/Skalman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skalman/subscriptions","organizations_url":"https://api.github.com/users/Skalman/orgs","repos_url":"https://api.github.com/users/Skalman/repos","events_url":"https://api.github.com/users/Skalman/events{/privacy}","received_events_url":"https://api.github.com/users/Skalman/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-11-10T16:11:45Z","updated_at":"2019-11-10T16:41:04Z","closed_at":"2019-11-10T16:41:04Z","author_association":"NONE","body":"<!--\r\n\r\nBEFORE SUBMITTING AN ISSUE:\r\n\r\n1.  Search for your issue on GitHub: https://github.com/prettier/prettier/issues\r\n    A large number of opened issues are duplicates of existing issues.\r\n    If someone has already opened an issue for what you are experiencing,\r\n    you do not need to open a new issue — please add a 👍 reaction to the\r\n    existing issue instead.\r\n\r\n2.  If your issue is with a prettier editor extension or add-on, please open the\r\n    issue in the repo for that extension or add-on, instead of this repo.\r\n\r\n-->\r\n**Heads up:** I don't believe this is an actual Prettier bug. I've reported the same bug to yarnpkg/yarn#7681. But it affects Prettier so badly, that I thought that I'd report it here for others searching.\r\n\r\n**Environments:**\r\n- Prettier Version: 1.9.1, 1.9.0, 1.8.2, 1.8.1, 1.8.0, 1.7.3\r\n- Running Prettier via: CLI <!-- CLI, Node.js API, Browser API, etc. -->\r\n- Runtime: Node.js 12, Yarn 1.19.1 <!-- Node.js v6, Chrome v67, etc. -->\r\n- Operating System: Ubuntu 18.04 <!-- Windows, Linux, macOS, etc. -->\r\n\r\n**Steps to reproduce:**\r\n<!-- shell script, js code, or a link to the minimal reproducible repository -->\r\n```sh\r\n$ yarn add prettier@1.9.1 --dev\r\nyarn add v1.19.1\r\n[1/4] Resolving packages...\r\n[2/4] Fetching packages...\r\n[3/4] Linking dependencies...\r\n[4/4] Building fresh packages...\r\nsuccess Saved lockfile.\r\nsuccess Saved 1 new dependency.\r\ninfo Direct dependencies\r\n└─ prettier@1.9.1\r\ninfo All dependencies\r\n└─ prettier@1.9.1\r\nDone in 12.77s.\r\n\r\n# It says that it's the right version, but I think it's a very old version\r\n$ node node_modules/.bin/prettier --version\r\n1.9.1\r\n\r\n$ ls node_modules/prettier/\r\nbin/  index.js  package.json  parser-babylon.js  parser-flow.js  parser-graphql.js  parser-markdown.js  parser-parse5.js  parser-postcss.js  parser-typescript.js  README.md  third-party.js\r\n\r\n$ echo '<!DOCTYPE html>' | node node_modules/.bin/prettier --parser html\r\n[error] stdin: Error: Couldn't resolve parser \"html\"\r\n[error]     at resolveParseFunction (/fake/path/node_modules/prettier/index.js:5844:13)\r\n[error]     at Object.parse$1 [as parse] (/fake/path/node_modules/prettier/index.js:5852:25)\r\n[error]     at formatWithCursor (/fake/path/node_modules/prettier/index.js:27628:22)\r\n[error]     at Object.formatWithCursor (/fake/path/node_modules/prettier/index.js:27906:12)\r\n[error]     at format (/fake/path/node_modules/prettier/bin/prettier.js:20363:21)\r\n[error]     at /fake/path/node_modules/prettier/bin/prettier.js:20466:19\r\n[error]     at processTicksAndRejections (internal/process/task_queues.js:93:5)\r\n\r\n$ echo 'alert(1)' | node node_modules/.bin/prettier --parser babel\r\n[error] stdin: Error: Couldn't resolve parser \"babel\"\r\n[error]     at resolveParseFunction (/fake/path/node_modules/prettier/index.js:5844:13)\r\n[error]     at Object.parse$1 [as parse] (/fake/path/node_modules/prettier/index.js:5852:25)\r\n[error]     at formatWithCursor (/fake/path/node_modules/prettier/index.js:27628:22)\r\n[error]     at Object.formatWithCursor (/fake/path/node_modules/prettier/index.js:27906:12)\r\n[error]     at format (/fake/path/node_modules/prettier/bin/prettier.js:20363:21)\r\n[error]     at /fake/path/node_modules/prettier/bin/prettier.js:20466:19\r\n[error]     at processTicksAndRejections (internal/process/task_queues.js:93:5)\r\n\r\n# This actually works!\r\n$ echo 'alert(1)' | node node_modules/.bin/prettier --parser babylon\r\nalert(1);\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nThe latest version of Prettier should be installed. This seems to work fine with `npm install`\r\n\r\n**Actual behavior:**\r\n\r\nLots of errors, as seen above."}}
{"actor":{"display_login":"Skalman"}}