bit icon indicating copy to clipboard operation
bit copied to clipboard

How can I use my custom workspace generator from self-hosted scope

Open front-end-captain opened this issue 3 years ago • 8 comments

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):

front-end-captain avatar Jul 27 '22 03:07 front-end-captain

Did you add your remote scope to be tracked?

bit remote add <my_remote_scope>

edit: fixed typo on scope

jonatankBIT avatar Jul 27 '22 06:07 jonatankBIT

@jonatankBIT Thanks reply. I try execute bit remote, but bit remote must used inside a workspace

front-end-captain avatar Jul 27 '22 06:07 front-end-captain

In that case:

  1. Create your workspace without the --default-scope flag.
  2. Run bit remote add <my_remote_scope>
  3. Update your defaultScope in your workspace.jsonc

jonatankBIT avatar Jul 27 '22 07:07 jonatankBIT

@jonatankBIT I get this error

image

front-end-captain avatar Jul 27 '22 07:07 front-end-captain

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 avatar Jul 27 '22 09:07 jonatankBIT

@jonatankBIT emmmm... An error reported in the first step, so it was impossible to create a workspace

front-end-captain avatar Jul 27 '22 10:07 front-end-captain

@jonatankBIT Can this problem still be solved?

front-end-captain avatar Jul 28 '22 02:07 front-end-captain

@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.

front-end-captain avatar Aug 01 '22 03:08 front-end-captain