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,295,670
Community Members
 
Community Events
165
Community Groups

Npm workspace lint in pipeline loops and crashes

Edited

Basically that, it appears you can't run npm --workspace commands in the pipeline:

 

+ npm run lint
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build
> npm run lint --workspaces
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build
> npm run lint --workspaces
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build
> npm run lint --workspaces
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build
> npm run lint --workspaces
Continues until it crashes, and then you get a extremely large number of errors.
The first of which is:
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn sh
npm ERR! file sh
npm ERR! path sh
npm ERR! errno EAGAIN
npm ERR! frontend-next@0.1.0 lint: `npm run lint --workspaces`
npm ERR! spawn sh EAGAIN
npm ERR!
npm ERR! Failed at the frontend-next@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
and then this repeated about 100 times:
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-08-19T23_27_12_631Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend-next@0.1.0 lint: `npm run lint --workspaces`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend-next@0.1.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The pipeline is only on step 2:
1) npm install
2) npm run lint
And lint script is 'npm run lint --workspaces', I have three apps. Pipeline uses image:node-12.22.5

1 answer

1 accepted

2 votes
Answer accepted

nvm - the official node 12 images install an old npm - 6.14.14, and npm workspaces are in npm 7.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,170 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you