Hello everyone! I hope this video has helped solve your questions and issues. This video is shared because a solution has been found for the question/problem. I create videos for questions that have solutions. If you have any other issues, feel free to reach out to me on Instagram: / ky.emrah
Below, you can find the text related to the question/problem. In the video, the question will be presented first, followed by the answers. If the video moves too fast, feel free to pause and review the answers. If you need more detailed information, you can find the necessary sources and links at the bottom of this description. I hope this video has been helpful, and even if it doesn't directly solve your problem, it will guide you to the source of the solution. I'd appreciate it if you like the video and subscribe to my channel!I'm having trouble installing npm and Angular CLI within a Bitbucket Pipeline
The following commands execute just fine in my local development environment:
npm install -g
npm install -g @angular/cli
npm install -g
npm install -g @angular/cli
But here's what happens when I try to do this within a Bitbucket pipeline:
step:
name: Web Admin Portal Deployment
caches:
node
script:
cd Admin
npm install -g
npm install -g @angular/cli
ng build --configuration staging
step:
name: Web Admin Portal Deployment
caches:
node
script:
cd Admin
npm install -g
npm install -g @angular/cli
ng build --configuration staging
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
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
No the truth is, although it did not break the script, the first npm install -g did not run cleanly, as it did on my local workstation. Here are the details, when I expand this section.
npm install -g
Any idea what I need to do to get this to runs cleanly within the Bitbucket pipeline? Thanks!
Edit: This might be a clue. I threw a command in there to output the version of node:
Edit:
node -v
v8.9.4
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?
How can I get a more recent version of Node installed in the pipeline?
npm install -g
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] node install.js /opt/atlassian/pipelines/agent/build/Admin/node_modules/esbuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (../../../../../../opt/atlassian/pipelines/agent/build/Admin/node_modules/vite/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (../../../../../../opt/atlassian/pipelines/agent/build/Admin/node_modules/esbuild/node_modules/@esbuild/android-arm):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"android","arch":"arm"} (current: {"os":"linux","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: @esbuild/[email protected] (../../../../../../opt/atlassian/pipelines/agent/build/Admin/node_modules/esbuild/node_modules/@esbuild/android-x64):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for @esbuild/[email protected]: wanted {"os":"android","arch":"x64Source of the question:
https://stackoverflow.com/questions/7...
Question and source license information:
https://meta.stackexchange.com/help/l...
https://stackoverflow.com/