yarn 1.5.1 (but works fine on 1.3.2)
execute yarn install
yarn-error.log:
Arguments:
C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js install
PATH:
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;s:\OpenServer\modules\php\PHP-7.1-x64;c:\Program Files\mingw-w64\x86_64-7.1.0-posix-seh-rt_v5-rev0\mingw64\bin;c:\_SOFT_\Git\bin;c:\_SOFT_\Git\usr\bin;c:\_SOFT_\oci;C:\Program Files (x86)\Avest\AvPCM_MNS;c:\_SOFT_\Blackfire\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Yarn\bin;C:\Program Files\nodejs\;s:\OpenServer\modules\database\MySQL-5.7-x64\bin\;C:\Users\dpa\AppData\Local\Yarn\bin;C:\Users\dpa\AppData\Roaming\npm
Yarn version:
1.5.1
Node version:
8.9.4
Platform:
win32 x64
npm manifest:
{
"name": "topby",
"version": "2.0.0",
"description": "EDI провайдер",
"private": true,
"dependencies": {
"babel-polyfill": "^6.26.0",
"base64-js": "^1.2.3",
"bignumber.js": "^6.0.0",
"file-saver": "^1.3.3",
"font-awesome": "^4.7.0",
"jquery": "^3.3.1",
"lodash": "^4.17.5",
"moment": "^2.20.1",
"select2": "^4.0.6-rc.1",
"select2-bootstrap-theme": "^0.1.0-beta.10",
"tui-editor": "^1.0.4"
},
"devDependencies": {
"@symfony/webpack-encore": "^0.19.0",
"ava": "^0.25.0",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-preset-es2015": "^6.24.1",
"bootstrap-sass": "^3.3.7",
"node-sass": "^4.7.2",
"sass-loader": "^6.0.6"
},
"scripts": {
"test": "ava"
},
"ava": {
"files": [
"assets/tests/*.js"
],
"source": [
"assets/js/*.js"
],
"failFast": true,
"serial": true,
"tap": false,
"verbose": false,
"require": [
"babel-register"
]
},
"babel": {
"presets": [
"es2015"
],
"plugins": [
"syntax-async-functions",
"transform-regenerator",
"check-es2015-constants",
"transform-es2015-block-scoping",
"transform-es2015-classes",
"transform-es2015-template-literals",
"transform-es2015-parameters"
]
}
}
yarn manifest:
No manifest
Lockfile:
see bellow
Trace:
Error: Can't add "raphael": invalid package version "2.2.0b".
at new MessageError (C:\Program Files (x86)\Yarn\lib\cli.js:186:110)
at PackageRequest.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:36413:15)
at Generator.next (<anonymous>)
at step (C:\Program Files (x86)\Yarn\lib\cli.js:98:30)
at C:\Program Files (x86)\Yarn\lib\cli.js:109:13
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
https://github.com/yarnpkg/yarn/issues/5292 changed behavior
It looks like tui-chart adds the dep to raphael:
"dependencies": {
"raphael": "https://github.com/nhnent/raphael.git#2.2.0b",
That GitHub repo does contain that branch and pacakge.json does have a matching version:
https://github.com/nhnent/raphael/blob/2.2.0b/package.json
2.2.0b is not valid semver:
~/Projects/yarn-test 🐒 node
> const s = require('semver');
undefined
> s.valid('2.2.0b')
null
> s.valid('2.2.0-b')
'2.2.0-b'
But it looks line in yarn 1.3.2 it somehow gets turned into 2.2.0-b instead, which is valid semver:
~/Projects/yarn-test 🐒 yarn list | grep raphael
├─ [email protected]
│ ├─ raphael@https://github.com/nhnent/raphael.git#2.2.0b
I believe that the reason for this is that https://github.com/yarnpkg/yarn/issues/5292 enforces semver too strictly on a package and breaks the functionality of allowing branch names from being specified in package.json.
I've run into this same problem and it's confirmed above since https://github.com/nhnent/raphael/tree/2.2.0b is a valid branch though an invalid semver.
@Gemorroj there's still an issue with yarn failing to pull in packages based off a branch name. Is this expected behavior in yarn moving forward?
Confirming I have same issue as @naganowl
Looks like there are fixtures for the upgrade flow that seem to support branches. Perhaps there's something broken with the add flow?
Took another look at my workflow and it turns out that my issue was indeed because the branch I was referencing had a package dependency whose version is invalid (2.3.1.3). Upon updating it, the issue went away. I was wrong to believe that branch references were broken.
@lightstrike perhaps another look at dependencies of your packages may reveal a similar issue.
I fixed this problem by renaming yarn.lock to something else (1yarn.lock) and then running yarn install again ;D