I don’t think this has to do with yarn. I am a bit confused on how this ever worked.
ng test
assumes that ng
is installed globally. Otherwise you would need to to execute the absolute command node_modules/angular-cli/bin/ng
unless you are calling it as a part of a script from package.json
.
Could you share your circle.yml from when you were doing this without yarn?
Ultimately there are two options (as far as I know)
- Install angular-cli globally
npm install -g angular-cli
so that you can callng
from any context - Make a script in
package.json
such as:
{
"scripts": {
"test": "ng test --watch=false"
}
and then execute it with
test:
override:
- npm run test
Update
I ran a build using just npm and it totally works just like you said.
Update 2
I see whats is going on here. The reason why “plain” npm just works is because our inference engine is exporting node_modules as a part of the build dependency step. When you run override
it no longer runs this step so then the node_modules
dependencies are no longer in the PATH.
So the way to get this to work would be:
- Add
node_modules/.bin
to the PATH - Make a script in package.json
- Install angular-cli globally