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

Cannot ready property 'endsWidth' of undefined #699

Closed
zslabs opened this issue Oct 11, 2016 · 5 comments
Closed

Cannot ready property 'endsWidth' of undefined #699

zslabs opened this issue Oct 11, 2016 · 5 comments
Labels

Comments

@zslabs
Copy link

zslabs commented Oct 11, 2016

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

What is the current behavior?
Running yarn on repo shows:

error TypeError: Cannot read property 'endsWith' of undefined
    at removeSuffix (/Users/zach/.yarn/lib/util/misc.js:42:14)
    at Function.parseRefs (/Users/zach/.yarn/lib/util/git.js:447:55)
    at /Users/zach/.yarn/lib/util/git.js:376:24
    at next (native)
    at step (/Users/zach/.yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /Users/zach/.yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20

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

Run yarn to install deps.

What is the expected behavior?

Completed install

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

Node v6.5.0
Yarn 0.15.1
Yosemite 10.11.6

@sebmck sebmck added the cat-bug label Oct 11, 2016
@hzoo
Copy link
Contributor

hzoo commented Oct 11, 2016

Looks like it's from

name = removeSuffix(name, '^{}');

    for (const line of refLines) {
      // line example: 64b2c0cee9e829f73c5ad32b8cc8cb6f3bec65bb refs/tags/v4.2.2
      const [sha, id] = line.split(/\s+/g);
      let [,, name] = id.split('/');

      // TODO: find out why this is necessary. idk it makes it work...
      name = removeSuffix(name, '^{}'); // name is undefined

@ijlind
Copy link

ijlind commented Oct 12, 2016

I got the same error today on a repo that has a private git repo as a dependency. Installs smoothly on other repos.

The private git dependency is defined along these lines in my package.json -file:

"dependencies": {
  "private_dependency_name": "git+ssh://git.private.org/home/git/private_dependency_name.git#v1.0.0"
},

Another private repo I have has an otherwise identical package.json contents and there yarn works a treat.

Edit. In addition, plain npm install works just fine with the problematic repo.

@lolmaus
Copy link

lolmaus commented Oct 18, 2016

Yep, also ran into this issue on a project depending on a private GitHub repo.

@chicoxyzzy
Copy link
Contributor

See #971

@samccone
Copy link
Member

Dup #573

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

No branches or pull requests

7 participants