1

I have a problem in my jenkins pipeline to run command npm install,

I check firstly my repo,

this project is a web application project, which contains not only angular code, also java code for backend.

I can also see the package.json file after runing my jenkins pipeline,

but I got this error:

Build Frontend
[Pipeline] sh
+ npm run-script build-si
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /home/jenkins/project/workspace/**/**/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/home/jenkins/project/workspace/**/**/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

I make sure that this path is right, under this path I can see the package.json file.

any soöution?

user1938143
  • 1,022
  • 2
  • 22
  • 46
  • Hope this helps https://stackoverflow.com/questions/49415958/what-could-cause-an-error-related-to-npm-not-being-able-to-find-a-file-no-conte – Sourav May 05 '21 at 04:12
  • add `ls -l` before 'npm run-script build-si' to list the files in current work dir, so that you can confirm the package.json exists in current work dir or not. If not there, means you need to cd the dir where package.json besides before execute npm cmd. – yong May 07 '21 at 07:46
  • @user1938143 Did you find any solution for this? Im facing the same issue – Adarsh Sreeram Oct 02 '22 at 11:18

0 Answers0