Python and Node Images Not Working Together

nodejs
python

#1

Hey CircleCI Team and Users. I am trying to build a deployment that pulls in a Django project that not only can run Python but does our automated front end testing through Node. When using two images of

 - image: circleci/python:3.6.1
 - image: circleci/node:4.8.2```

The failure I am experiencing in later steps states that `npm` is not installed.

My current solution is to install a Ubuntu build and install all the pieces necessary by run commands which I do not feel is the best. Any help would be appreciated.

NPM can't be found by circle
#2

If you look at the documentation for “Specifying Container Images”, under the heading “Using Multiple Docker Images” it explains that listing multiple container images should be used when you have external services you depend on (such as a database or caching system). These external services are expected to expose a network port which will then be made available to the primary image. More importantly:

In a multi-image configuration job, all steps are executed in the container created by the first image listed.

Based on the configuration you provided, this means that all your commands are being run inside the circleci/python:3.6.1 image.

Since you have a situation which requires a complex set of dependencies, you can either install additional dependencies inline during your test run or (recommended) build your own Docker image that contains the exact dependencies you need. CircleCI provides instructions on how to build and publish your own Docker image for this purpose. My team at work uses this method, and it has significantly reduced are set-up time during tests.


#3

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