Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,473
Community Members
 
Community Events
176
Community Groups

NodeJS Pipeline: Node vs atlassian image

Edited

Hello,

specifying "image: node:14.X" in the pipeline leads to the "npm install" failure.  The "npm install" will also fail, if I use "node:16".

But if I specify " image:atlassian/default-image:3" the " npm install" will succeed.

According to the documentation:

  • node: 14.17.5

Question:

 what makes the images different?

 

Bitbucket_pipelines.yml:

working version:

image: atlassian/default-image:3

pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- node
script:
- npm install

```

 

Failing version:

image: node:14.17.5

pipelines:
default:
- parallel:
- step:
name: Build and Test
caches:
- node
script:
- npm install


 

Log:


npm ERR! checking the name lister (/usr/bin/nm -B) interface... BSD nm

npm ERR! checking whether ln -s works... yes

npm ERR! checking the maximum length of command line arguments... 1572864

npm ERR! checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop

npm ERR! checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop

npm ERR! checking for /usr/bin/ld option to reload object files... -r

npm ERR! checking for objdump... objdump

npm ERR! checking how to recognize dependent libraries... pass_all

npm ERR! checking for dlltool... no

npm ERR! checking how to associate runtime and link libraries... printf %s\n

npm ERR! checking for archiver @FILE support... @

npm ERR! checking for strip... strip

npm ERR! checking for ranlib... ranlib

npm ERR! checking command to parse /usr/bin/nm -B output from gcc object... ok

npm ERR! checking for sysroot... no

npm ERR! checking for a working dd... /bin/dd

npm ERR! checking how to truncate binary pipes... /bin/dd bs=4096 count=1

npm ERR! checking for mt... no

npm ERR! checking if : is a manifest tool... no

npm ERR! checking for ANSI C header files... yes

npm ERR! checking for sys/types.h... yes

npm ERR! checking for sys/stat.h... yes

npm ERR! checking for stdlib.h... yes

npm ERR! checking for string.h... yes

npm ERR! checking for memory.h... yes

npm ERR! checking for strings.h... yes

npm ERR! checking for inttypes.h... yes

npm ERR! checking for stdint.h... yes

npm ERR! checking for unistd.h... yes

npm ERR! checking for dlfcn.h... yes

npm ERR! checking for objdir... .libs

npm ERR! checking if gcc supports -fno-rtti -fno-exceptions... no

npm ERR! checking for gcc option to produce PIC... -fPIC -DPIC

npm ERR! checking if gcc PIC flag -fPIC -DPIC works... yes

npm ERR! checking if gcc static flag -static works... yes

npm ERR! checking if gcc supports -c -o file.o... yes

npm ERR! checking if gcc supports -c -o file.o... (cached) yes

npm ERR! checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes

npm ERR! checking dynamic linker characteristics... GNU/Linux ld.so

npm ERR! checking how to hardcode library paths into programs... immediate

npm ERR! checking whether stripping libraries is possible... yes

npm ERR! checking if libtool supports shared libraries... yes

npm ERR! checking whether to build shared libraries... no

npm ERR! checking whether to build static libraries... yes

npm ERR! checking whether ln -s works... yes

npm ERR! checking for pkg-config... /usr/bin/pkg-config

npm ERR! checking pkg-config is at least version 0.9.0... yes

npm ERR! checking size of size_t... 8

npm ERR! checking whether compiler supports pointers to undefined structures... yes

npm ERR! checking whether __SUNPRO_C is declared... no

npm ERR! checking for pow in -lm... yes

npm ERR! checking for libpng... yes

npm ERR! checking for ANSI C header files... (cached) yes

npm ERR! checking stddef.h usability... yes

npm ERR! checking stddef.h presence... yes

npm ERR! checking for stddef.h... yes

npm ERR! checking for stdlib.h... (cached) yes

npm ERR! checking locale.h usability... yes

npm ERR! checking locale.h presence... yes

npm ERR! checking for locale.h... yes

npm ERR! checking for string.h... (cached) yes

npm ERR! checking for sys/types.h... (cached) yes

npm ERR! checking for an ANSI C-conforming const... yes

npm ERR! checking whether char is unsigned... no

npm ERR! checking for inline... inline

npm ERR! checking for size_t... yes

npm ERR! checking for unsigned char... yes

npm ERR! checking for unsigned short... yes

npm ERR! checking if right shift is signed... yes

npm ERR! checking for memset... yes

npm ERR! checking for memcpy... yes

npm ERR! checking libjpeg API version... 8.0

npm ERR! checking libjpeg shared library version... 8.1.2

npm ERR! checking whether the linker supports version scripts... yes (GNU style)

npm ERR! checking whether to use version script when building mozjpeg... yes

npm ERR! checking for inline... inline __attribute__((always_inline))

npm ERR! checking whether to include arithmetic encoding support... yes

npm ERR! checking whether to include arithmetic decoding support... yes

npm ERR! checking whether to use 12-bit samples... no

npm ERR! checking whether to build TurboJPEG C wrapper... yes

npm ERR! checking whether to build TurboJPEG Java wrapper... no

npm ERR! checking if we have SIMD optimisations for cpu type... yes (x86_64)

npm ERR! checking for nasm... no

npm ERR! checking for nasmw... no

npm ERR! checking for yasm... no

npm ERR!

npm ERR! at /opt/atlassian/pipelines/agent/build/node_modules/bin-build/node_modules/execa/index.js:231:11

npm ERR! at runMicrotasks (<anonymous>)

npm ERR! at processTicksAndRejections (internal/process/task_queues.js:95:5)

npm ERR! at async Promise.all (index 0)

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

npm ERR! /root/.npm/_logs/2022-01-23T22_52_48_131Z-debug-0.log

 

 

1 answer

0 votes
Pramodh M Community Leader Jan 23, 2022

Hi @Admin Admin 

node doesn't have your scripts pipe defined

name: Build and Test
caches:
- node
script:
- npm install

So this part will fail if you use node image!!

You can use the Atlassian Image and then modify based on what software you need to use while building a pipeline


If you need to use a node image, find where the node path is, and add it, then you will be able to use it

Let me know if you need further clarification

Thanks,
Pramodh

@Pramodh M:

thank you for a quick reply.

> .. If you need to use a node image, find where the node path is, and add it, then you will be able to use it

 

what is the "node path"?

 

sorry, I'm not familiar with the node ecosystem.

 

What i find odd is that "image : node" is used in the pipeline template in the BB for NodeJs builds...

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events