Today I cannot get my build to pass…
sh: 1: eslint: not found
If I comment out the lint command it fails on next…
sh: 1: mocha: not found
Weird thing is I reran a built that did pass 2 months ago and it fails today…
See #40 https://app.circleci.com/pipelines/github/patient-provider/vision
Could you please SSH into a container and run the commands manually and see if you are getting the same error.
Thanks for looking into this. When I SSH into the container and run the commands manually I get the same errors. I would have included images of tails of logs, but I am limited in the number of images I can include.
Here’s tail of first log file:
Here’s tail of second log file:
Could you please check if mocha and eslist set as
devDependencies in package.json? Are you setting
NODE_ENV=production or something else that is only installing regular dependencies?
Also, please try to use latest node image and let us know how it goes.
Thanks for responding quickly. Below are the answers to your questions/suggestions. Everything seems in order, but build fails.
eslint and mocha are devDependencies
I’m not using NODE_ENV.
I changed the image to
Limited on number of links I may provide in reply…Here are linked to package.json and config.yml
This was a bit of a puzzler! It looks like at some point, the
node_modules directory was added to the git repository.
Because of this, the install was skipping for most of the dependencies. When the
node_modules was committed, it did not have the
.bin directory. It actually looks like
node_modules/.bin was explicitly excluded in the
So to adjust this, I would follow this series of steps
git rm -r node_modules
git commit -m "Remove node_modules"
- Edit the
.gitignore file and remove the entry
node_modules/**/.bin/ and other
- Ignore the entire
node_modules directory in the
.gitignore with simply
git add .gitignore
git commit -m "Ignore entire node_modules directory"
- Edit the
.circleci/config.yml and increment the cache keys prefixes from
git add .circleci/config.yml
git commit -m "Increment CircleCI cache keys"
git push origin master
That should now populate the
node_modules/.bin directory which has the symlinks that are included in the
$PATH environment variable when running scripts via
Boom! Thanks for your help. This worked, though I had to increment cache to V3 since I already had V2 cache.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.