bit
bit copied to clipboard
Cannot read properties of undefined (reading 'legacyScope')
Describe the bug
got error when creating a new lane
Steps to Reproduce
- bit lane create my-lane --scope @ichigo-kurosaki.my-first-lane
- got error Cannot read properties of undefined (reading 'legacyScope')
Expected Behavior
successfully added and checked out to a new lane my-lane
Screenshots, exceptions and logs
If applicable, add screenshots, exceptions, and logs to help explain your problem.
Specifications
- Bit version: 1.5.13
- Workspace type: (harmony/legacy)
- Node version: v20.10.0
- npm / yarn version:10.2.3
- Platform: Mac os M1 ventura 13.3.1
Please run it again then attach the debug.log. You can find its location by running bit globals command
hi, where did you get the syntax to add @ for the scope name?
please run
bit lane create my-lane --scope ichigo-kurosaki.my-first-lane
also, if you have defaultScope set in your workspace.jsonc, the lane create command will use it by default.
Please run it again then attach the debug.log. You can find its location by running bit globals command
here the log bro @GiladShoham
MacBook-Pro-2 lane % bit lane create my-lane --scope ichigo-kurosaki.my-first-lane --log
*** Loading Bit *** argv:
/Users/learn/.bvm/nodejs/20.10.0/bin/node
/Users/learn/.bvm/links/bit/node_modules/@teambit/bit/bin/bit
lane
create
my-lane
--scope
ichigo-kurosaki.my-first-lane
--log
[*] started a new command: "create" with the following data:
args: [
"my-lane"
]
flags: {
"scope": "ichigo-kurosaki.my-first-lane",
"log": true,
"lane-name": "my-lane",
"laneName": "my-lane"
}
got an error from command create: TypeError: Cannot read properties of undefined (reading 'legacyScope')
err: {
"type": "TypeError",
"message": "Cannot read properties of undefined (reading 'legacyScope')",
"stack":
TypeError: Cannot read properties of undefined (reading 'legacyScope')
at createLaneInScope (/Users/learn/.bvm/versions/1.5.13/bit-1.5.13/node_modules/@teambit/lanes/dist/create-lane.js:115:29)
at LanesMain.createLane (/Users/learn/.bvm/versions/1.5.13/bit-1.5.13/node_modules/@teambit/lanes/dist/lanes.main.runtime.js:414:65)
at LaneCreateCmd.report (/Users/learn/.bvm/versions/1.5.13/bit-1.5.13/node_modules/@teambit/lanes/dist/lane.cmd.js:230:37)
at async CommandRunner.runReportHandler (/Users/learn/.bvm/versions/1.5.13/bit-1.5.13/node_modules/@teambit/cli/dist/command-runner.js:157:20)
at async CommandRunner.runCommand (/Users/learn/.bvm/versions/1.5.13/bit-1.5.13/node_modules/@teambit/cli/dist/command-runner.js:98:16)
}
Cannot read properties of undefined (reading 'legacyScope')
[+] CLI-OUTPUT: Cannot read properties of undefined (reading 'legacyScope')
[*] the command "create" has been terminated with an error code 1
hi, where did you get the syntax to add
@for the scope name? please run
@itaymendel i tried by removing the @ but still not working.
at that case i want to create a new scope for my lane, so i dont need to use defaulf scope, right ?
If you won't specify the scope it will create it in the default scope as configured in the workspace.jsonc file. Can you please check if this still happens with the latest version of bit? @davidfirst fyi
I just tried no errors.
There is another bug which let you running the command above with the invalid @ character. I'll take care of this.