GeezerVison is showing github.com — TypeError: Cannot read property 'newIndex' of undefined · Issue #1657 · semantic-release/semantic-release
TypeError: Cannot read property 'newIndex' of undefined #1657DescriptionCurrent behavior
Semantic release fails in Github Actions with the above error message
Expected behavior
Release should be done propoer
Environment
Run yarn install
yarn install v1.22.5
info No lockfile found.
[1/4] Resolving packages...
warning libnpm > npm-lifecycle > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning libnpm > npm-lifecycle > node-gyp > request > [email protected]: this library is no longer supported
warning semantic-release > @semantic-release/npm > npm > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 32.08s.
yarn run v1.22.5
$ /home/runner/work/npmx/npmx/node_modules/.bin/semantic-release
[5:26:40 AM] [semantic-release] › ℹ Running semantic-release version 17.2.0
[5:26:41 AM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/home/runner/work/npmx/npmx/node_modules/semantic-release/lib/get-config.js:103:18)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/lib/get-config.js:80:21)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/index.js:257:32)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/cli.js:55:5)
TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/home/runner/work/npmx/npmx/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/home/runner/work/npmx/npmx/node_modules/semantic-release/lib/get-config.js:103:18)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/lib/get-config.js:80:21)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/index.js:257:32)
at async module.exports (/home/runner/work/npmx/npmx/node_modules/semantic-release/cli.js:55:5)error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 1.
Reacted by Michael Aicher, Peter Merkert, Johnny Huynh, Marco Link and mommack1234 Reacted by Eugene L. and mommack1234 ActivityMichaelAicher commented on Oct 12, 2020 We're experiencing the same issue on Gitlab.
[OK]Using Docker executor with image node:10 ...
[OK]Pulling docker image node:10 ...
[OK]Using docker image sha256:a8441ebf4e4da3557acec63c3b9b87f0a3e11b16811f7991a292e108ddb21053 for node:10 ...
(...)
$ npx -p @semantic-release/changelog -p @semantic-release/git -p @semantic-release/gitlab -p @semantic-release/gitlab-config -p semantic-release semantic-release
npx: Installed 1488 in 27.663s
[8:05:44 AM] [semantic-release] › ℹ Running semantic-release version 17.2.0
[8:05:44 AM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/root/.npm/_npx/15/lib/node_modules/semantic-release/lib/get-config.js:103:18)
TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/root/.npm/_npx/15/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/root/.npm/_npx/15/lib/node_modules/semantic-release/lib/get-config.js:103:18)section_end:1602489946:build_scriptPeterMerkert commented on Oct 12, 2020 Same on CircleCI:
npx: installed 770 in 12.481s
[5:43:30 AM] [semantic-release] › ℹ Running semantic-release version 17.2.0
[5:43:30 AM] [semantic-release] › ✖ An error occurred while running semantic-release: TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/lib/get-config.js:103:18)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/lib/get-config.js:80:21)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/index.js:257:32)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/cli.js:55:5)
TypeError: Cannot read property 'newIndex' of undefined
at extractPropertyKeysOfObject (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:87:34)
at extractPropertyKeysOfObject (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:65:39)
at extractAllPropertyKeysOfContent (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:45:14)
at checkRedundancy (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:28:27)
at _default (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/node_modules/find-duplicated-property-keys/build/index.js:15:14)
at pkgRepoUrl (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/lib/get-config.js:103:18)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/lib/get-config.js:80:21)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/index.js:257:32)
at async module.exports (/home/circleci/.npm/_npx/121/lib/node_modules/semantic-release/cli.js:55:5)
yevhenlisovenko commented on Oct 12, 2020 Confirm the issue in 17.2.0. Waiting the fix!
Updated:
as a temporary solution we have fixed the version in deploy
npx [email protected] Reacted by Peter Merkert, Michael Aicher and Johnny Huynh travi commented on Oct 12, 2020 I've reverted the change that introduced this issue. a new version that includes the revert should publish soon semantic-release-bot commented on Oct 12, 2020 🎉 This issue has been resolved in version 17.2.1 🎉
The release is available on:
Your semantic-release bot 📦🚀 gr2m commented on Oct 12, 2020 We introduced the new find-duplicated-property-keys dependency in 17.2.0, as part of #1656. All tests passed, but looks like we missed something. Sorry for the trouble! gr2m commented on Oct 12, 2020 Here is a minimal test case to reproduce the problem: https://runkit.com/gr2m/semantic-release-semantic-release-1657
It looks like the semantic-release configuration might cause the problem, if you have nested arrays in the "release" configuration, e.g.
{
"release": {
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/github",
{
"assets": "generated/*.json"
}
],
"@semantic-release/npm"
]
}
}mommack1234 commented on Jan 5, 2021 added a commit that references this issue on Jul 15, 2025This issue will close once commit 3abcbaf is merged into the 'master' branch.3abcbaf
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|