How to install dependencies and start server for an external repository on circleCI?

I have a circleci config file where I have written multiple steps before running the actual test suite. One of the steps include cloning an external private repository, installing dependencies and running the server. However the build fails on that step, it shows that dependencies are installed but does not start the server and shows tons of warnings and errors.

steps:
  - checkout
  - node/install-packages
  - ruby/install-deps
  - run:
      name: Clone Plugins Repository
      command: |
        git clone <repo_clone> // this is successful 
        yarn install
        yarn start
  - run:
       ...rest of steps...

Is there something I am missing? It works fine when I am run it locally but throws error on circleci. How to install packages and start server of the specific repo that I have cloned

Can you post the log that lists the earnings and errors from the job. Also, more of your config.yml would help as that would then provide details about which versions of the ORBS you are using.

One thing to note is that the current node ORB has support for the installation of yarn, but the default is npm - I do not have enough of an understanding of what will happen if the ORB first installs npm and you then install yarn, but a few posts on the internet indicate that you can expect at least some lock file warnings.

Current node ORB docs are here

https://circleci.com/developer/orbs/orb/circleci/node

Thanks. But can you please tell me if this approach is correct? I mean how will circleci differentiate between which project to start, either the root project or the one which I am cloning?

I’m not a coder so can not really comment on your overall use of the coding tools, also you have not posted enough details for anyone to provide any detailed answers.

One thing you should try is just fully using the node ORB, there are examples on the page I linked that show how to get the ORB to load yarn, this will stop npm from being installed and remove the need for you to have the separate “yarn install” command.