Getting "Cannot find module" NPM error while uploading on CircleCI

Getting error while uploading on CircleCI. Can you help?
Tried installing package dotenv-expand and dotenv

#!/bin/bash -eo pipefail
npm run setup

my-app@0.1.0 setup /home/circleci/mern-starter
set PORT=3002 && node scripts/start.js

module.js:549
Error: Cannot find module ‘dotenv-expand’
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at dotenvFiles.forEach.dotenvFile (/home/circleci/mern-starter/config/env.js:35:5)
at Array.forEach ()
at Object. (/home/circleci/mern-starter/config/env.js:33:13)
at Module._compile (module.js:652:30)
at Object.Module._extensions…js (module.js:663:10)
at Module.load (module.js:565:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app@0.1.0 setup: set PORT=3002 && node scripts/start.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app@0.1.0 setup script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

ERR! A complete log of this run can be found in:
ERR! /home/circleci/.npm/_logs/2018-07-24T16_37_35_861Z-debug.log
Exited with code 1

The actual problem you are experiencing is that your project is missing a JavaScript module.

  1. Have you installed all the dependencies of this project?
  2. What command did you issue to do that?
  3. May we see your dependencies file?

Thanks for the reply man but i already figured out the issue. You’re right it was a dependency issue. command : npm install nightwatch fixed it. :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.