Missed Team ’24? Catch up on announcements here.

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

Pipeline Failed npm ERR! ENOTDIR:

Tejas Patil
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 29, 2022

Below is my bitbucket-pipelines.yml file


# This is a sample build configuration for JavaScript.
# Check our guides at https://confluence.atlassian.com/x/14UWN for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.

image: gambtho/awscli_node:latest

pipelines:
  branches:
    develop:
      - step:
          caches:
            - node
          size: 2x
          script: # Modify the commands below to build your repository.
            - npm install
            - export NODE_OPTIONS=--max-old-space-size=6144
            - npm run build
            - apt-get update && apt-get install -y python-dev
            - curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
            - python get-pip.py
            - pip install awscli


PIPELINE ERROR 

npm ERR! Linux 5.15.0-1026-aws
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v6.14.4
npm ERR! npm v3.10.10
npm ERR! path /opt/atlassian/pipelines/agent/build/node_modules/.staging/@types/eslint-scope-de087609/package.json
npm ERR! code ENOTDIR
npm ERR! errno -20
npm ERR! syscall open
npm ERR! ENOTDIR: not a directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/@types/eslint-scope-de087609/package.json'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! Please include the following file with any support request:
npm ERR! /opt/atlassian/pipelines/agent/build/npm-debug.log


Pipeline is getting failed with above error. Any help would be appreciated.

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 2, 2023

Hi @Tejas Patil and welcome to the community.

I found a similar issue reported in the issue tracker of the repository for npm cli:

Based on the comments in that post, the issue may be related to a library on package.json whose version may not be compatible with the version of npm and node you are using.

The Dockerhub image gambtho/awscli_node:latest that you use as a build container has node v6.14.4 and npm v3.10.10, which are both quite old versions. If you want to keep using this Dockerhub image, you can check the suggestion posted here in order to figure out which library may be causing the issue:

Another thing you can try is using a different Docker image that has more recent versions of node v6.14.4 and npm v3.10.10. You can debug this locally with Docker first so that you don't consume your Pipelines build minutes, and try different Docker images using the following guide until you resolve this error:

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events