It is a bit an older thread. But I have a very simular issue with the environment
bitbucket
Angular CLI - ng ....
Workspace
etc.
I have a complex pipeline to check the code, build the code and deploy the results ti Google Firebase environment. The crashy part of the pipeline looks like that
image: trion/ng-cli-karma:latest
pipelines:
branches:
master:
- step:
name: clean cache
script:
- pipe: atlassian/bitbucket-clear-cache:3.2.0
variables:
BITBUCKET_USERNAME: $BITBUCKET_USER_NAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
condition:
changesets:
includePaths:
- package.json
- angular.json
- bitbucket-pipeline.yml
- step:
name: install env
....
- step:
name: lint code
script:
- npm list | grep angular
- echo "$(ls -la)"
- npm run version
- npm run lint
- echo "$(ls -la)"
....
- step:
name: build app
script:
- npm list | grep angular
- echo "$(ls -la)"
- npm run version
- npm run build:prod
- echo "$(ls -la)"
artifacts:
- dist/**
- step:
name: deploy app
deployment: production
....
I cought that message, but it looks god with the access to command ng from the angular/cli package. It is globally installed be the pipeline.
+ npm run build:prod
> app-whatever build:prod
> ng build --prod --build-optimizer --progress=false
Error: This command is not available when running the Angular CLI outside a workspace.
Maybe someone solved that problem before. Thx in advance for some hints.