Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

210
Views
Node.js install Python dependencies from within package.json

I'm building a Node.JS project that uses both Python and NPM dependency modules.

The Node.JS modules are located within package.json and the python dependencies are inside a file requirements.txt.

I would like to install all the dependency modules (Python and Node.JS) from within package.json by running npm install.

Is this possible and how?

Thanks in advance!

The files look like below.

package.json:


{
  "name": "app",
  "version": "1.0.0",
  "description": "Trial app",
  "main": "bin/index.js",
  "scripts": {
    "dev": "npm install",
    "start": "node app.js",
    "test": "jest --forceExit "
  },
  "keywords": [
    "AI",
    "Blockchain",
    "Decentralized"
  ],
  "dependencies": {
    "peerjs": "^1.3.2",
    "redis": "^3.1.2",
    "socket.io": "^4.1.2",
    "socket.io-client": "^4.1.2",
    "wrtc": "^0.4.7"
  },
  "devDependencies": {
    "@babel/core": "^7.16.7",
    "supertest": "^6.1.6"
  }
}

requirements.txt:


Django==2.2.21
djangorestframework==3.7.7
django-rest-swagger
coreapi

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You can define Commands to run within the "scripts" section of your package.json. Every script in there can be run with npm run [scriptname].

So you could do (&& runs another command after the first one)

"scripts": {
    "install": "npm install && pip -r requirements.txt",
    "dev": "npm install",
    "start": "node app.js",
    "test": "jest --forceExit "
  }

And run npm run install

about 4 years ago · Juan Pablo Isaza Report

0

Replace "dev": "npm install" with "dev": "npm install & pip install"

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!