NPM install fails on pipeline
Asked by Diwakar Chapagain:

I have a pipeline it used to work fine but now suddenly npm install fails. Any help on fixing this would be great

Below is the sample of the error stack

*** ** * ** ***

"npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-a10b2afc/src'  
npm WARN tar ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/operators/zipAll.d.ts'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/src'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-d5c47b0a/_esm2015'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-a10b2afc/_esm2015'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/src'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-d5c47b0a/_esm5'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-a10b2afc/_esm5'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/src'  
npm WARN tar ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-d5c47b0a/LICENSE.txt'  
npm WARN tar ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-a10b2afc/LICENSE.txt'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/src'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-d5c47b0a/src'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-a10b2afc/src'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/_esm2015'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/_esm5'  
npm WARN tar ENOENT: no such file or directory, open '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/LICENSE.txt'  
npm WARN tar ENOENT: no such file or directory, lstat '/opt/atlassian/pipelines/agent/build/node_modules/.staging/rxjs-0d3768eb/src'"


Answers:
author: Diwakar Chapagain
body: Figured out, it was happening because of a package being removed or de-linked from a repo.

comments: author: Shreya Subramaniam
body: How did you figure out the package that was causing the issue? I am facing the same error as you have mentioned above and would be useful to understand how you found the package causing the problem.


author: Diwakar Chapagain
body: I tried installing locally with the --verbose flag on, that gave me error which was the package being removed in the npm repo. I use private repo not public NPM.


author: Shreya Subramaniam
body: thank you :)


author: BangsKeyboards
body: How did you fix the issue? Did you have to manually remove the package somehow?


Tags: bitbucket-cloud

bitbucket-pipelines

cloud