node-gitlab-2-github icon indicating copy to clipboard operation
node-gitlab-2-github copied to clipboard

Cannot read property 'toString' of undefined while fetching GitLab projects

Open aleksey-katerov opened this issue 5 years ago • 1 comments

Hi, I am trying to migrate some our projects from our inner enterprise GitLab to GitHub and get following:

An Error occured while fetching all GitLab projects: TypeError: Cannot read property 'toString' of undefined at GitlabHelper. (/tmp/gittest/node-gitlab-2-github/src/gitlabHel per.ts:39:26) at step (/tmp/gittest/node-gitlab-2-github/src/gitlabHelper.ts:33:23) at Object.next (/tmp/gittest/node-gitlab-2-github/src/gitlabHelper.ts:14:53) at fulfilled (/tmp/gittest/node-gitlab-2-github/src/gitlabHelper.ts:5:58) at processTicksAndRejections (internal/process/task_queues.js:93:5)

Any help is appreciated.

Settings are: import Settings from './src/settings';

export default { gitlab: { url: '<Gitlab_root>/<GitLab_subgroup>', token: 'migrate:', projectId: null, }, github: { baseUrl: 'api.github.com', owner: '', token: '', repo: '<repo_name>', }, usermap: { ... }, projectmap: { '<project_name>': '/<project_name>', }, conversion: { useLowerCaseLabels: true, }, debug: false, usePlaceholderIssuesForMissingIssues: true, useReplacementIssuesForCreationFails: true, useIssuesForAllMergeRequests: false, skipMatchingComments: [], mergeRequests: { logFile: './merge-requests.json', log: false, }, }

aleksey-katerov avatar Oct 20 '20 15:10 aleksey-katerov

@aleksey-katerov it seems your project has no id it can print. (only toString in gitlabHelper I could find)

I think you need to remove the gitlab subgroup.

spruce avatar Nov 17 '20 12:11 spruce