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 nmnpm ERR! checking whether ln -s works... yesnpm ERR! checking the maximum length of command line arguments... 1572864npm ERR! checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noopnpm ERR! checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noopnpm ERR! checking for /usr/bin/ld option to reload object files... -rnpm ERR! checking for objdump... objdumpnpm ERR! checking how to recognize dependent libraries... pass_allnpm ERR! checking for dlltool... nonpm ERR! checking how to associate runtime and link libraries... printf %s\nnpm ERR! checking for archiver @FILE support... @npm ERR! checking for strip... stripnpm ERR! checking for ranlib... ranlibnpm ERR! checking command to parse /usr/bin/nm -B output from gcc object... oknpm ERR! checking for sysroot... nonpm ERR! checking for a working dd... /bin/ddnpm ERR! checking how to truncate binary pipes... /bin/dd bs=4096 count=1npm ERR! checking for mt... nonpm ERR! checking if : is a manifest tool... nonpm ERR! checking for ANSI C header files... yesnpm ERR! checking for sys/types.h... yesnpm ERR! checking for sys/stat.h... yesnpm ERR! checking for stdlib.h... yesnpm ERR! checking for string.h... yesnpm ERR! checking for memory.h... yesnpm ERR! checking for strings.h... yesnpm ERR! checking for inttypes.h... yesnpm ERR! checking for stdint.h... yesnpm ERR! checking for unistd.h... yesnpm ERR! checking for dlfcn.h... yesnpm ERR! checking for objdir... .libsnpm ERR! checking if gcc supports -fno-rtti -fno-exceptions... nonpm ERR! checking for gcc option to produce PIC... -fPIC -DPICnpm ERR! checking if gcc PIC flag -fPIC -DPIC works... yesnpm ERR! checking if gcc static flag -static works... yesnpm ERR! checking if gcc supports -c -o file.o... yesnpm ERR! checking if gcc supports -c -o file.o... (cached) yesnpm ERR! checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yesnpm ERR! checking dynamic linker characteristics... GNU/Linux ld.sonpm ERR! checking how to hardcode library paths into programs... immediatenpm ERR! checking whether stripping libraries is possible... yesnpm ERR! checking if libtool supports shared libraries... yesnpm ERR! checking whether to build shared libraries... nonpm ERR! checking whether to build static libraries... yesnpm ERR! checking whether ln -s works... yesnpm ERR! checking for pkg-config... /usr/bin/pkg-confignpm ERR! checking pkg-config is at least version 0.9.0... yesnpm ERR! checking size of size_t... 8npm ERR! checking whether compiler supports pointers to undefined structures... yesnpm ERR! checking whether __SUNPRO_C is declared... nonpm ERR! checking for pow in -lm... yesnpm ERR! checking for libpng... yesnpm ERR! checking for ANSI C header files... (cached) yesnpm ERR! checking stddef.h usability... yesnpm ERR! checking stddef.h presence... yesnpm ERR! checking for stddef.h... yesnpm ERR! checking for stdlib.h... (cached) yesnpm ERR! checking locale.h usability... yesnpm ERR! checking locale.h presence... yesnpm ERR! checking for locale.h... yesnpm ERR! checking for string.h... (cached) yesnpm ERR! checking for sys/types.h... (cached) yesnpm ERR! checking for an ANSI C-conforming const... yesnpm ERR! checking whether char is unsigned... nonpm ERR! checking for inline... inlinenpm ERR! checking for size_t... yesnpm ERR! checking for unsigned char... yesnpm ERR! checking for unsigned short... yesnpm ERR! checking if right shift is signed... yesnpm ERR! checking for memset... yesnpm ERR! checking for memcpy... yesnpm ERR! checking libjpeg API version... 8.0npm ERR! checking libjpeg shared library version... 8.1.2npm ERR! checking whether the linker supports version scripts... yes (GNU style)npm ERR! checking whether to use version script when building mozjpeg... yesnpm ERR! checking for inline... inline __attribute__((always_inline))npm ERR! checking whether to include arithmetic encoding support... yesnpm ERR! checking whether to include arithmetic decoding support... yesnpm ERR! checking whether to use 12-bit samples... nonpm ERR! checking whether to build TurboJPEG C wrapper... yesnpm ERR! checking whether to build TurboJPEG Java wrapper... nonpm ERR! checking if we have SIMD optimisations for cpu type... yes (x86_64)npm ERR! checking for nasm... nonpm ERR! checking for nasmw... nonpm ERR! checking for yasm... nonpm ERR!npm ERR! at /opt/atlassian/pipelines/agent/build/node_modules/bin-build/node_modules/execa/index.js:231:11npm 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
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
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...
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.