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 'name' of undefined

See original GitHub issue

Hi, I’m trying to setup a pre release for a given branch and I’m facing the same issue as https://github.com/semantic-release/git/issues/185.

See the last command of the travis job here: https://travis-ci.org/github/cloudnc/ngx-sub-form/builds/726664320

[10:34:50 PM] [semantic-release] › ℹ Start step "fail" of plugin "@semantic-release/github" [10:34:50 PM] [semantic-release] [@semantic-release/github] › ℹ Verify GitHub authentication [10:34:51 PM] [semantic-release] › ✖ Failed step "fail" of plugin "@semantic-release/github" [10:34:51 PM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: Cannot read property 'name' of undefined at module.exports (/home/travis/build/cloudnc/ngx-sub-form/node_modules/@semantic-release/github/lib/get-fail-comment.js:17:10) at module.exports (/home/travis/build/cloudnc/ngx-sub-form/node_modules/@semantic-release/github/lib/fail.js:28:74) at async fail (/home/travis/build/cloudnc/ngx-sub-form/node_modules/@semantic-release/github/index.js:64:3) at async validator (/home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/lib/plugins/normalize.js:34:24) at async /home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/lib/plugins/pipeline.js:37:34 at async /home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/lib/plugins/pipeline.js:31:3 at async Object.pluginsConf.<computed> [as fail] (/home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/lib/plugins/index.js:80:11) at async callFail (/home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/index.js:235:7) at async module.exports (/home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/index.js:264:7) at async module.exports (/home/travis/build/cloudnc/ngx-sub-form/node_modules/semantic-release/cli.js:55:5) { pluginName: '@semantic-release/github' } [10:34:51 PM] [semantic-release] › ✖ EPRERELEASEBRANCH A pre-release branch configuration is invalid in the `branches` configuration. Each pre-release branch in the branches configuration (https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md#branches) must have a prerelease property valid per the Semantic Versioning Specification (https://semver.org/#spec-item-9). If the prerelease property is set to true, then the name property is used instead.

I did upgrade semantic-release to latest (17.1.1):

https://github.com/cloudnc/ngx-sub-form/pull/176/commits/12d12b32f775d75438b0a7c75a35ca41448ab0cf

And I’m trying to setup a pre release branch with the following:

https://github.com/cloudnc/ngx-sub-form/pull/176/commits/1e2a3fd5c31f362518bf9791a05659e4770f7f89

{
  "pkgRoot": "dist/ngx-sub-form",
  "branches": [
    "master",
    {
      "name": "feat/rewrite",
      "channel": "beta-rewrite",
      "prerelease": true
    }
  ]
}

Am I missing something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
travicommented, Sep 26, 2020

i happened to be reading the details of the prerelease property a bit more closely today and found a detail that i think would help in this situation, if i understand your goal correctly.

you should be able to use the name property to match your branch name, even if it contains characters that are invalid in a pre-release identifier, and then use the prerelease property to define the actual pre-release identifier that should be used.

1reaction
travicommented, Sep 14, 2020

What is channel for exactly then?

npm dist-tags are used to define the distribution channels, which you can learn more about here: https://docs.npmjs.com/adding-dist-tags-to-packages. channel defines the dist tag to be used when publishing from this branch.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read property 'name' of undefined
This type of error mean that your container variable file is not defined. You should use console.log at different places to see what...
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 'name' of undefined
It is a very common error when working with object and array to get a TypeError: Cannot read property 'name' of undefined ....
Read more >
Cannot read property 'name' of undefined' mean? - Quora
Usually it means you misspelled a variable name, or forgot to declare a variable, or it is out of scope.
Read more >
TypeError: Cannot read property 'name' of undefined, why is ...
TypeError : Cannot read property 'name' of undefined, why is this? // Our Person constructor. var Person = function(name, age){ this.name = name; ......
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