Do you want to request a feature or report a bug?
bug
What is the current behavior?
when i upgrade yarn:npm i [email protected] -g and run yarn first,it reply :TypeError: Cannot set property 'getDocsInfo' of undefined。
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
Please mention your node.js, yarn and operating system version.
win 10 15063 x64,node 6.10.3 x64, npm 3.10.10
Every time reply this error, actually.
Yeah, same here. All our builds are failing because of this error. 3 other people working on different projects are also getting this.
Can report this too.
I can't work, because yarn can't execute run dev, it's frustrating.
This is a duplicate of https://github.com/yarnpkg/yarn/issues/3850
Drop yarn folks, no reason to use it with npm v5.
just updated the ubuntu package and having same issue as reported above. Also our builds using the npm's version are failing
It's because the package node-emoji
updated with a new dependency of lodash.toArray
I run yarn on meteor, and this is what I get.
/Users/AlanChusuei/.meteor/packages/meteor-tool/.1.4.3_1.d4y6i2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/yarn/lib-legacy/cli/commands/index.js:322
commands[key].getDocsInfo = getDocsInfo(key);
^
TypeError: Cannot set property 'getDocsInfo' of undefined
at Object.<anonymous> (/Users/AlanChusuei/.meteor/packages/meteor-tool/.1.4.3_1.d4y6i2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/yarn/lib-legacy/cli/commands/index.js:322:29)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at _load_index3 (/Users/AlanChusuei/.meteor/packages/meteor-tool/.1.4.3_1.d4y6i2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/yarn/lib-legacy/cli/index.js:30:43)
at Object.<anonymous> (/Users/AlanChusuei/.meteor/packages/meteor-tool/.1.4.3_1.d4y6i2++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/yarn/lib-legacy/cli/index.js:148:54)
at Module._compile (module.js:409:26)
Workaround: npm install -g [email protected]
I released 1.6.1
reverting the changes in 1.6.0
- yarn should work again now.
We needed to use lodash toArray because it has a special behavior with emoji that other solutions didn't have, but if that dependency breaks yarn, I guess we can't use it.
The issue is that the third key
value when iterating over (_aliases || _load_aliases()).default
is getKeyByValue
.
I'm still not sure why the new dependency would've broken yarn (the release works fine), but let me know if anyone finds out something!
Got the same issue after npm install -g [email protected]
@omnidan It's because your change was a patch release, which yarn permits in its package.json
Anyone installing yarn via npm would get your latest patch
Yarn should lock its dependencies to patch or strict versions. ^
is way too permissive.
This will fix it - https://github.com/omnidan/node-emoji/pull/46
@jdbevan it was a minor release (from 1.5
to 1.6
) - the "fix" (reverting all changes from 1.6 in 1.6.1) was a patch release
Last npm install -g yarn
successful !
Yep, all working again since the reverts, even CI builds
@raphael22 glad to know that fixed it! Next time I make a release I'll try and see if yarn still works 😅
@omnidan thanks for the correction!
Thank you for the correction!!!
I'm going to close this out since the package has been fixed, and the long-term fix is tracked in #3853
Yarn should lock its dependencies to patch or strict versions.
^
is way too permissive.
@bazyli-brzoska That would work in some cases, but won't fully help. Even if Yarn has strict versions, packages that Yarn depends on may not. The ideal fix for us is to publish the single JS file build, which is what we do for all other distribution methods (tarball, Debian package, RPM package, and Windows installer).
Most helpful comment
@raphael22 glad to know that fixed it! Next time I make a release I'll try and see if yarn still works 😅