I've just created a new Angular Application by running ng new name
After this finished I ran (as described in the documentation: https://angular.io/guide/bazel)
ng add @angular/bazel
to add Bazel to my project.
But after this command finished, there is no WORKSPACE
file or any BUILD
file in my project.
I am relatively new to Bazel, but I am sure that those files should be there?!
What is also strange is that when running ng add @angular/bazel
, I often get this error:
An unhandled exception occurred: npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm WARN tar write after end
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! A complete log of this run can be found in:
npm ERR! /home/flo/.npm/_logs/2020-02-13T09_42_26_044Z-debug.log
Package install failed, see above.
See "/tmp/ng-3enaGH/angular-errors.log" for further details.
By default, the WORKSPACE and BUILD.bazel are only created when needed - during a build or when ng serve is running.
See the advanced section in the document you referenced above for how to change the defaults:
ng build --leaveBazelFilesOnDisk
For your second question, I had to upgrade node+angular to the latest LTS version before it worked for me.