-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while running bit compile after creating custom environment #35
Comments
@ocombe Anything missing in steps here? |
You will need to update your workspace.jsonc to use that custom env:
|
Sorry but i did not clearly understand that, Can you help by updating on repository if possible? Repo: Contribute access: |
workspace.jsonc should look something like that: /**
* this is the main configuration file of your bit workspace.
* for full documentation, please see: https://harmony-docs.bit.dev/workspace/configurations
**/{
"$schema": "https://static.bit.dev/teambit/schemas/schema.json",
/**
* main configuration of the Bit workspace.
**/
"teambit.workspace/workspace": {
/**
* the name of the component workspace. used for development purposes.
**/
"name": "checkone",
/**
* set the icon to be shown on the Bit server.
**/
"icon": "https://static.bit.dev/bit-logo.svg",
/**
* default directory to place a component during `bit import` and `bit create`.
* the following placeholders are available:
* name - component name includes namespace, e.g. 'ui/button'.
* scopeId - full scope-id includes the owner, e.g. 'teambit.compilation'.
* scope - scope name only, e.g. 'compilation'.
* owner - owner name in bit.dev, e.g. 'teambit'.
**/
"defaultDirectory": "{scope}/{name}",
/**
* default scope for all components in workspace.
**/
"defaultScope": "company.scope"
},
/**
* main configuration for component dependency resolution.
**/
"teambit.dependencies/dependency-resolver": {
/**
* choose the package manager for Bit to use. you can choose between 'yarn', 'pnpm'
*/
"packageManager": "teambit.dependencies/pnpm",
"policy": {
"dependencies": {
"@teambit/angular-v13": "0.0.17"
},
"peerDependencies": {}
},
"nodeLinker": "hoisted"
},
/**
* workspace variants allow to set different subsets of configuration for components in your
* workspace. this is extremely useful for upgrading, aligning and building components with a new
* set of dependencies. a rule can be a directory or a component-id/namespace, in which case,
* wrap the rule with curly brackets (e.g. `"{ui/*}": {}`)
* see https://harmony-docs.bit.dev/aspects/variants for more info.
**/
"teambit.workspace/variants": {
"scope/angmatenv": {
"teambit.harmony/aspect": {}
},
"*": {
"scope/angmatenv": {}
}
},
"teambit.angular/[email protected]": {},
"teambit.generator/generator": {
"aspects": [
"scope/angmatenv"
]
}
} |
Also keep in mind that when you change your custom env, you will need to compile it before it actually compiles the component with the new changes, this means either using |
After updating workspace.jsonc as above getting below error, tried bit compile twice as well Updated code is available at the repo, |
it works for me with the current code of your repo, maybe there's some artifact in your |
Deleted .git/bit Same error occurred. Delete node_modules folder Still same error occurred. Cloned the repo into new folder Still same error occurred. Something strange is happening on my machine. may be something specific to my machine. @ocombe , did you follow any additional steps after cloning the repo? |
I cloned it, ran |
Well there you go, |
|
No idea, I'll check tomorrow |
Tried from scratch with latest version,
Updated workspace.jsonc file as per stated in previous comments Ran Below is detailed error snapshot, @ocombe , Let me know if you got chance to look at this. Thanks! |
@rishikeshjadhav |
Here is the code repo, I have added you as collaborator, https://github.com/rishikeshjadhav/angbitcustomenv/invitations |
@rishikeshjadhav "@teambit/angular-v13": "0.0.19" to the dependencies. I added it and removed "@teambit/toolbox.performance.v8-cache": "0.0.18", to make it work for me. ran these commands bit install bit compile bit start |
I will give this a try tomorrow morning and will run some tests with material UI components. Will update the ticket, thanks for looking into this! |
Adding However when i try to add a reference to load material style in custom environment as below,
On running bit compile --log, getting below error I have created a new repository for the same, please see below URL Material style reference is added in below file of custom environment, You are invited as collaborater, @ocombe @ashishkrtewari, Can you please check this and let me know if anything is missing? |
This is an issue with |
Steps followed:
bit new ng-workspace checkone -a teambit.angular/angular-v13
bit create ng-module ui/autocomplete
bit create ng-env angmatenv
On running
bit compile
getting below errorThe text was updated successfully, but these errors were encountered: