cli
cli copied to clipboard
TypeError: Cannot set property 'travis-deploy-once' of undefined
> semantic-release-cli setup
? What is your npm registry? https://registry.npmjs.org/
? What is your npm username? wmhilton
? What is your npm password? [hidden]
WARN semantic-release keytar is not installed correctly, not saving password
? What is your GitHub username? wmhilton
? What is your GitHub password? [hidden]
? What is your GitHub two-factor authentication code? 460109
WARN semantic-release keytar is not installed correctly, not saving password
? What CI are you using? Travis CI
? Do you want a `.travis.yml` file with semantic-release setup? Yes
ERR! semantic-release TypeError: Cannot set property 'travis-deploy-once' of undefined
ERR! semantic-release at setUpTravis (C:/global_modules/node_modules/semantic-release-cli/src/lib/travis.js:140:7)
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:68:7)
ERR! semantic-release { TypeError: Cannot set property 'travis-deploy-once' of undefined
ERR! semantic-release at setUpTravis (C:/global_modules/node_modules/semantic-release-cli/src/lib/travis.js:140:7)
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:68:7)
ERR! semantic-release stack:
ERR! semantic-release 'TypeError: Cannot set property \'travis-deploy-once\' of undefined\n at setUpTravis (C:/global_modules/node_modules/semantic-release-cli/src/lib/travis.js:140:7)\n at process._tickCallback (internal/process/next_tick.js:68:7)' }
> semantic-release-cli --version
4.0.5
Even with the latest semantic-release-cli I run into this issue. It helped to add "travis-deploy-once": "travis-deploy-once" to the package.json's script section. At least that worked for me. I've to migrate further repositories - I will keep you posted.
Yes, I can ensure that this is the reason.
The issue is with not having a scripts part of the package.json, the cli should create a scripts property if one does not exist.
The issue is with not having a scripts part of the package.json, the cli should create a scripts property if one does not exist.
So we have two issue reasons gathered: a) no scripts part exists in package.json b) "travis-deploy-once" script is missing in the scripts section
@papakai are you sure you are not mistaking (b) for (a)? I have a feeling that (a) is the only issue here. Do you mind running the cli with an empty scripts:
...
"scripts": {
}
...
@Introvertuous I am pretty sure as I tested this already with multiple repositories. If I get the time, for sure I can again give things a try, but honestly I am pretty busy for the next quarter.