question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'load' of undefined

See original GitHub issue

I attempted to install and set up commitizen to my project for the first time, but it seems like it is throwing a strange error.

> npx git-cz

Cannot read property 'load' of undefined
npm ERR! code ELIFECYCLE
npm ERR! errno 1

This is a fresh install and no custom configuration. This is what is in my package.json config

"config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  }

I had a look through the code and I suspect this is the line where the error is thrown image

If anyone has any idea why it would be throwing this error please let me know.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:7
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
LinusUcommented, May 5, 2020

This PR should fix it: #733

Will merge as soon as it is green. Super sorry for this everyone, I didn’t realise that this was part of the public api.

Will also have a look at why the tests didn’t catch this, it seems like they do now that a new version is published. I believe that this is because the tests install from npm, a good approach is probably to change this to npm pack and then npm install /path/to/pack/file.gz instead.

Hopefully a new version should be published in ~15 minutes!

1reaction
hristijankikocommented, May 5, 2020

@Techn1x I’m pretty sure its not the method that’s undefined, its the configLoader itself.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Cannot read property 'load' of undefined" - Stack Overflow
Try adding an onload event to the script tag. So change your script tag to
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
[SOLVED] Cannot Read Property of Undefined in JavaScript
The “cannot read property of undefined” error occurs when you attempt to access a property or method of a variable that is undefined...
Read more >
Uncaught TypeError: Cannot read property 'load' of undefined
i have a proble with .load() data into datatable here my code webix.ready(function() { $$(“tabel_barang”).load(“crud/load-data.php”); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found