-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Angular material install command fails in MFE workspace - Bootstrap call not found #7621
Comments
Hi, please find an explanation and a solution here: Best wishes, |
hey guys, I got this output with this solution: I guess it is because I have a workspace.json, and not a angular.json... any workaround? |
@cassiomansini Are you using |
The output is this:
Also, if i try
|
Once upon a time, my mentor used to say:
So here I am, 5 mins later:
Now I have another problem to think about the next 5 minutes. |
@cassiomansini That looks like an issue with Angular Material. They aren't supporting other builders which is required for MFEs. My suggestion would be to manually change your app's executor in the build target to be |
Didnt find where to change that, can you help me locate this? |
In your |
My workspace isnt like that, but I found it on
So I needed to change back the builder for its original value And now I`m good to go! thanks @Coly010 |
Glad to hear it! |
@Coly010 ok, this is a know issue, my question is if this is how it is going to work or if there will be in the future a fix so we don~t need to go through @manfredsteyer solution. Also, if that is going to be the standard procedure, it should be added somehwere on the docs, so ppl know ahead where they are getting into when considering Nx to their projects. Do you agree? |
This is a very targeted and specific issue, based on certain decisions from external sources (angular material, if you're using MFE, what builder/executor you're using already, the change in main.ts and bootstrap.ts required for MFEs), therefore it'll likely remain that you can simply follow the instructions kindly provided by Manfred :) |
@Coly010 Changing the executor string on the
Getting an exception as the same before using the
|
@anandjaisy You need change the option main: option also to be "apps//src/bootstrap.ts" |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Adding angular material by using the following command to an MFE type workspace fails with error.
When creating a workspace with the angular preset, the command works as expected with no issues, this seems to only happen in an MFE type workspace.
Expected Behavior
I expect the command run successfully, the bootstrap is supposed to modify the index.html to add fonts, and update the style.scss with the selected theme.
The workaround is to manually edit these files after installing angular/material.
Unknown
Steps to Reproduce
npx create-nx-workspace material-mfe cd material-mfe npm i -D @nrwl/angular nx g @nrwl/angular:application --mfe --mfeType=host --routing npm install @angular/material npx nx g @angular/material:ng-add --project=material-mfe
Output:
✔ Choose a prebuilt theme name, or "custom" for a custom theme: · custom
✔ Set up global Angular Material typography styles? (y/N) · true
✔ Set up browser animations for Angular Material? (Y/n) · true
✔ Packages installed successfully.
SchematicsException [Error]: Bootstrap call not found
at findBootstrapModulePath (/Users/rolandbecsi/Development/test-angular/node_modules/@angular/cdk/schematics/utils/vendored-ast-utils/index.js:452:15)
Failure Logs
SchematicsException [Error]: Bootstrap call not found
at findBootstrapModulePath (/Users/rolandbecsi/Development/test-angular/node_modules/@angular/cdk/schematics/utils/vendored-ast-utils/index.js:452:15)
at Object.getAppModulePath (/Users/rolandbecsi/Development/test-angular/node_modules/@angular/cdk/schematics/utils/vendored-ast-utils/index.js:475:32)
at /Users/rolandbecsi/Development/test-angular/node_modules/@angular/material/schematics/ng-add/setup-project.js:65:44
at Generator.next ()
at fulfilled (/Users/rolandbecsi/Development/test-angular/node_modules/@angular/material/schematics/ng-add/setup-project.js:12:58)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
Environment
Node : 14.18.1
OS : darwin x64
npm : 6.14.15
nx : Not Found
@nrwl/angular : 13.1.3
@nrwl/cli : 13.1.3
@nrwl/cypress : 13.1.3
@nrwl/devkit : 13.1.3
@nrwl/eslint-plugin-nx : 13.1.3
@nrwl/express : Not Found
@nrwl/jest : 13.1.3
@nrwl/linter : 13.1.3
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 13.1.3
@nrwl/web : Not Found
@nrwl/workspace : 13.1.3
@nrwl/storybook : 13.1.3
@nrwl/gatsby : Not Found
typescript : 4.3.5
The text was updated successfully, but these errors were encountered: