bit
bit copied to clipboard
How can I use my custom workspace generator from self-hosted scope
Description
I write a workspace generator and exported to my self-hosted scope, but when use it
bit new dp-example-workspace bit-workspace-test --aspect dp-design/my-workspace-generator --default-scope dp-design
then get error:
cannot find scope 'dp-design'. if you are targeting a self-hosted scope, please ensure the scope is configured in your remotes (via "bit remote" command) and that the scope name is correct.if this is a scope on bit.cloud please add the organization name before the scope (yourOrg.some-scope-name)
Specifications
- Bit version: 0.0.791
- Node version: 16.14.2
- npm / yarn version: 7.24.2/1.22.18
- Platform:mac os
- Bit compiler (include version):
- Bit tester (include version):
Did you add your remote scope to be tracked?
bit remote add <my_remote_scope>
edit: fixed typo on scope
@jonatankBIT Thanks reply. I try execute bit remote, but bit remote must used inside a workspace
In that case:
- Create your workspace without the
--default-scopeflag. - Run
bit remote add <my_remote_scope> - Update your
defaultScopein yourworkspace.jsonc
@jonatankBIT I get this error
After bit new .... cd into bit-workspace-test afterwards:
bit new dp-example-workspace bit-workspace-test --aspect dp-design/my-workspace-generator
cd bit-workspace-test
bit remote add http://10.248.142.3:3000
// update scope on `dafaultScope`
Does it still persist?
@jonatankBIT emmmm... An error reported in the first step, so it was impossible to create a workspace
@jonatankBIT Can this problem still be solved?
@jonatankBIT I found a solution.
bit remote add <my_self_remote_scope_url> -g
and then
bit new dp-example-workspace bit-workspace-test --aspect dp-design/my-workspace-generator --default-scope dp-design
success.