{"action":"created","issue":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/6139","repository_url":"https://api.github.com/repos/yarnpkg/yarn","labels_url":"https://api.github.com/repos/yarnpkg/yarn/issues/6139/labels{/name}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/6139/comments","events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/6139/events","html_url":"https://github.com/yarnpkg/yarn/issues/6139","id":343617625,"node_id":"MDU6SXNzdWUzNDM2MTc2MjU=","number":6139,"title":"yarn does not install the newer version, results in non working package (less)","user":{"login":"anantoghosh","id":12339068,"node_id":"MDQ6VXNlcjEyMzM5MDY4","avatar_url":"https://avatars3.githubusercontent.com/u/12339068?v=4","gravatar_id":"","url":"https://api.github.com/users/anantoghosh","html_url":"https://github.com/anantoghosh","followers_url":"https://api.github.com/users/anantoghosh/followers","following_url":"https://api.github.com/users/anantoghosh/following{/other_user}","gists_url":"https://api.github.com/users/anantoghosh/gists{/gist_id}","starred_url":"https://api.github.com/users/anantoghosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantoghosh/subscriptions","organizations_url":"https://api.github.com/users/anantoghosh/orgs","repos_url":"https://api.github.com/users/anantoghosh/repos","events_url":"https://api.github.com/users/anantoghosh/events{/privacy}","received_events_url":"https://api.github.com/users/anantoghosh/received_events","type":"User","site_admin":false},"labels":[{"id":313603437,"node_id":"MDU6TGFiZWwzMTM2MDM0Mzc=","url":"https://api.github.com/repos/yarnpkg/yarn/labels/cat-bug","name":"cat-bug","color":"d93f0b","default":false}],"state":"open","locked":false,"assignee":{"login":"rally25rs","id":38535,"node_id":"MDQ6VXNlcjM4NTM1","avatar_url":"https://avatars3.githubusercontent.com/u/38535?v=4","gravatar_id":"","url":"https://api.github.com/users/rally25rs","html_url":"https://github.com/rally25rs","followers_url":"https://api.github.com/users/rally25rs/followers","following_url":"https://api.github.com/users/rally25rs/following{/other_user}","gists_url":"https://api.github.com/users/rally25rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rally25rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rally25rs/subscriptions","organizations_url":"https://api.github.com/users/rally25rs/orgs","repos_url":"https://api.github.com/users/rally25rs/repos","events_url":"https://api.github.com/users/rally25rs/events{/privacy}","received_events_url":"https://api.github.com/users/rally25rs/received_events","type":"User","site_admin":false},"assignees":[{"login":"rally25rs","id":38535,"node_id":"MDQ6VXNlcjM4NTM1","avatar_url":"https://avatars3.githubusercontent.com/u/38535?v=4","gravatar_id":"","url":"https://api.github.com/users/rally25rs","html_url":"https://github.com/rally25rs","followers_url":"https://api.github.com/users/rally25rs/followers","following_url":"https://api.github.com/users/rally25rs/following{/other_user}","gists_url":"https://api.github.com/users/rally25rs/gists{/gist_id}","starred_url":"https://api.github.com/users/rally25rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rally25rs/subscriptions","organizations_url":"https://api.github.com/users/rally25rs/orgs","repos_url":"https://api.github.com/users/rally25rs/repos","events_url":"https://api.github.com/users/rally25rs/events{/privacy}","received_events_url":"https://api.github.com/users/rally25rs/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-07-23T12:45:20Z","updated_at":"2018-07-23T14:03:43Z","closed_at":null,"author_association":"NONE","body":"**Do you want to request a *feature* or report a *bug*?**\r\nBug\r\n\r\n**What is the current behavior?**\r\nI'm trying to upgrade to the latest `less` package (3.8.0) released a few hours ago, but yarn ends up not installing the newer version, but still removed the files missing from the newer package which resulted in a corrupted install.\r\n\r\nI am able to reproduce it consistently on my system:\r\nIn a new package folder:\r\n```\r\n// Add previous version of less\r\nPS D:\\Develop\\react-config\\yarnerror> yarn add less@3.7.1\r\nyarn add v1.7.0\r\ninfo No lockfile found.\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 55 new dependencies.\r\n\r\n// Check less version\r\nPS D:\\Develop\\react-config\\yarnerror> yarn lessc --version\r\nyarn run v1.7.0\r\n$ D:\\Develop\\react-config\\yarnerror\\node_modules\\.bin\\lessc --version\r\nlessc 3.7.1 (Less Compiler) [JavaScript]\r\nDone in 1.26s.\r\n\r\n// Add the newer less\r\nPS D:\\Develop\\react-config\\yarnerror> yarn add less\r\nyarn add v1.7.0\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└─ less@3.8.0\r\ninfo All dependencies\r\n└─ less@3.8.0\r\nDone in 13.65s.\r\n\r\n// Yarn check reports older version still installed\r\nPS D:\\Develop\\react-config\\yarnerror> yarn check\r\nyarn check v1.7.0\r\nerror \"less\" is wrong version: expected \"3.8.0\", got \"3.7.1\"\r\nerror Found 1 errors.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/check for documentation about this command.\r\nPS D:\\Develop\\react-config\\yarnerror>\r\n\r\n// Again try to get less version results in error\r\n// The file it is referring to 'math-constants' was removed in the latest version\r\nPS D:\\Develop\\react-config\\yarnerror> yarn lessc --version\r\nyarn run v1.7.0\r\n$ D:\\Develop\\react-config\\yarnerror\\node_modules\\.bin\\lessc --version\r\nmodule.js:549\r\n    throw err;\r\n    ^\r\n\r\nError: Cannot find module '../math-constants'\r\n    at Function.Module._resolveFilename (module.js:547:15)\r\n    at Function.Module._load (module.js:474:25)\r\n    at Module.require (module.js:596:17)\r\n    at require (internal/module.js:11:18)\r\n    at Object.<anonymous> (D:\\Develop\\react-config\\yarnerror\\node_modules\\less\\lib\\less\\tree\\declaration.js:5:12)\r\n    at Module._compile (module.js:652:30)\r\n    at Object.Module._extensions..js (module.js:663:10)\r\n    at Module.load (module.js:565:32)\r\n    at tryModuleLoad (module.js:505:12)\r\n    at Function.Module._load (module.js:497:3)\r\nerror Command failed with exit code 1.\r\ninfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.\r\n```\r\n\r\nI was also able to reproduce this by:\r\nRemoving all yarn caches\r\ninstall latest `less` (lessc working at this point)\r\nInstall older less `less@3.7.1`\r\nyarn check, reports error \"less\" is wrong version: expected \"3.7.1\", got \"3.8.0\"\r\ntrying to use `lessc` results in error Error: Cannot find module '../constants'\r\nthis file was added in 3,8,0, and is not available in 3.7.1\r\n\r\nI have confirmed that:\r\nThe correct version is downloaded by yarn,\r\nIt was correctly extracted in the cache folder.\r\n\r\nSystem:\r\nwindows 10\r\nyarn 1.7.0 **(installed via scoop)** (path: D:\\Installed\\Scoop\\apps\\yarn)\r\npowershell"},"comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments/407069067","html_url":"https://github.com/yarnpkg/yarn/issues/6139#issuecomment-407069067","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/6139","id":407069067,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzA2OTA2Nw==","user":{"login":"anantoghosh","id":12339068,"node_id":"MDQ6VXNlcjEyMzM5MDY4","avatar_url":"https://avatars3.githubusercontent.com/u/12339068?v=4","gravatar_id":"","url":"https://api.github.com/users/anantoghosh","html_url":"https://github.com/anantoghosh","followers_url":"https://api.github.com/users/anantoghosh/followers","following_url":"https://api.github.com/users/anantoghosh/following{/other_user}","gists_url":"https://api.github.com/users/anantoghosh/gists{/gist_id}","starred_url":"https://api.github.com/users/anantoghosh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantoghosh/subscriptions","organizations_url":"https://api.github.com/users/anantoghosh/orgs","repos_url":"https://api.github.com/users/anantoghosh/repos","events_url":"https://api.github.com/users/anantoghosh/events{/privacy}","received_events_url":"https://api.github.com/users/anantoghosh/received_events","type":"User","site_admin":false},"created_at":"2018-07-23T14:03:43Z","updated_at":"2018-07-23T14:03:43Z","author_association":"NONE","body":"ok thank you"}}
{"actor":{"display_login":"anantoghosh"}}