Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot set property 'getDocsInfo' of undefined #3851

Closed
yoyo837 opened this issue Jul 7, 2017 · 24 comments
Closed

TypeError: Cannot set property 'getDocsInfo' of undefined #3851

yoyo837 opened this issue Jul 7, 2017 · 24 comments

Comments

@yoyo837
Copy link

yoyo837 commented Jul 7, 2017

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

@yoyo837
Copy link
Author

yoyo837 commented Jul 7, 2017

Every time reply this error, actually.

@ralt
Copy link

ralt commented Jul 7, 2017

Yeah, same here. All our builds are failing because of this error. 3 other people working on different projects are also getting this.

@igeligel
Copy link

igeligel commented Jul 7, 2017

Can report this too.

@yoyo837
Copy link
Author

yoyo837 commented Jul 7, 2017

I can't work, because yarn can't execute run dev, it's frustrating.

@jdbevan
Copy link

jdbevan commented Jul 7, 2017

This is a duplicate of #3850

@paulmillr
Copy link

Drop yarn folks, no reason to use it with npm v5.

@ghost
Copy link

ghost commented Jul 7, 2017

just updated the ubuntu package and having same issue as reported above. Also our builds using the npm's version are failing

@hbeachey
Copy link

hbeachey commented Jul 7, 2017

It's because the package node-emoji updated with a new dependency of lodash.toArray

@AChusuei
Copy link

AChusuei commented Jul 7, 2017

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)

@niieani
Copy link

niieani commented Jul 7, 2017

Workaround: npm install -g [email protected]

@omnidan
Copy link

omnidan commented Jul 7, 2017

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.

@mateuszdargacz
Copy link

mateuszdargacz commented Jul 7, 2017

The issue is that the third key value when iterating over (_aliases || _load_aliases()).default is getKeyByValue.

@omnidan
Copy link

omnidan commented Jul 7, 2017

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!

@raphael22
Copy link

Got the same issue after npm install -g [email protected]

@jdbevan
Copy link

jdbevan commented Jul 7, 2017

@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

@bbrzoska
Copy link

bbrzoska commented Jul 7, 2017

Yarn should lock its dependencies to patch or strict versions. ^ is way too permissive.

@cubikdavid
Copy link

This will fix it - omnidan/node-emoji#46

@omnidan
Copy link

omnidan commented Jul 7, 2017

@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

@raphael22
Copy link

Last npm install -g yarn successful !

@ripexz
Copy link

ripexz commented Jul 7, 2017

Yep, all working again since the reverts, even CI builds

@omnidan
Copy link

omnidan commented Jul 7, 2017

@raphael22 glad to know that fixed it! Next time I make a release I'll try and see if yarn still works 😅

@jdbevan
Copy link

jdbevan commented Jul 7, 2017

@omnidan thanks for the correction!

@jtwalraven
Copy link

Thank you for the correction!!!

@Daniel15
Copy link
Member

Daniel15 commented Jul 7, 2017

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests