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

empty dependencies key throws error #7018

Open
DanielRuf opened this Issue Feb 9, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@DanielRuf
Copy link
Contributor

DanielRuf commented Feb 9, 2019

Do you want to request a feature or report a bug?

Bug

What is the current behavior?
After yarn init and publishing the package to GitHub only and then running yarn global add user/repo it throws

Resolving packages...
error An unexpected error occurred: "Cannot read property 'split' of undefined".
info If you think this is a bug, please open a bug report with the information p
rovided in "C:\\Users\\Daniel\\AppData\\Local\\Yarn\\Data\\global\\yarn-error.lo
g".
info Visit https://yarnpkg.com/en/docs/cli/global for documentation about this c
ommand.

It seems this happens because dependencies is not in packages.json. An empty dependencies in there seems to fix this.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
It should also work without any dependencies in the package.

Please mention your node.js, yarn and operating system version.

$ node --version && yarn --version
v8.11.0
1.13.0
Windows 10 in Git Bash

@heupr heupr bot added the triaged label Feb 9, 2019

@DanielRuf DanielRuf changed the title emmpty dependencies key throws error empty dependencies key throws error Feb 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment