Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

I can't install Angular inside my pipeline

Yossi Geretz September 25, 2024 edited

I am trying to execute the following command so that I can build my Angular application within the pipeline:

- npm install -g @angular/cli

But this throws an error:

+ npm install -g @angular/cli npm

ERR! code EUNSUPPORTEDPROTOCOL npm

ERR! Unsupported URL Type "npm:": npm:string-width@^4.2.0 npm

ERR! A complete log of this run can be found in: npm

ERR! /root/.npm/_logs/2024-09-25T19_58_43_985Z-debug.log npm

ERR! code EUNSUPPORTEDPROTOCOL npm

ERR! Unsupported URL Type "npm:": npm:string-width@^4.2.0 npm

ERR! A complete log of this run can be found in: npm

ERR! /root/.npm/_logs/2024-09-25T19_58_43_985Z-debug.log

 

Here is the yaml:

(The indentation got lost on the paste.)

 

- step:
name: Web Admin Portal Deployment
caches:
- node
script:
- cd Admin
- npm cache clean --force
- npm install -g
- npm install -g @angular/cli
- ng build --configuration staging
- cd dist/lightning-admin
- pipe: atlassian/aws-s3-deploy:1.6.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: 's3-web-stg-0'
LOCAL_PATH: '/dist/lightning-admin/'

1 answer

1 accepted

0 votes
Answer accepted
Yossi Geretz September 25, 2024

This might be a clue. I threw a command in there to output the version of node:

node -v

v8.9.4

Yikes! That's quite old! On my workstation I am running v20.15.1

How can I get a more recent version of Node installed in the pipeline?

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 26, 2024

Hi @Yossi Geretz 

You would either need to use a different build image that contains a higher version of Node, or you would need to update the node version as part of your script prior to executing commands.

If you still encounter issues - please raise a support ticket using your workspace URL, as we'll need a support ticket to access your YML config/build environment to troubleshoot further:

If you are unable to raise a ticket, please let me know which timezone you are located in so I can make sure that the ticket is routed to the correct team that operates in your area.

Cheers!

- Ben (Bitbucket Cloud Support)

Like Sabine Mayer likes this
Yossi Geretz September 27, 2024

Thank you! I found this image and it worked for me.

 

image: node:20.15.1
Thanks for your response.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, forge, forge learning path, atlassian learning, cloud app development, forge app development, build forge apps, atlassian certification, developer training, jira app development, confluence app development, automation, ui frameworks

Turn Ideas into Atlassian Apps 📱

From setup to deployment—this learning path shows you how to build your first app using Forge. Learn the essentials, streamline workflows, and bring custom solutions to life across Jira, Confluence, and more.

Start Learning
AUG Leaders

Atlassian Community Events