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.)
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?
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you! I found this image and it worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.