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,467,700
Community Members
 
Community Events
177
Community Groups

Pipeline Failed npm ERR! ENOTDIR:

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

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

Atlassian Community Events