def run(self):
        # check repo root for a package.json file
        if not os.path.isfile(self.repo_root+"/package.json"):
            print("Creating package.json...", file=sys.stderr)
            self.create_package_json()


        cmds = ["npm", "install", "--progress-false"]
        try:
            run(cmds, cwd=self.repo_root)
        except __HOLE__ as e:
            print("Failed to run `npm install`: %s" % e, file=sys.stderr)
            print("npm is required to build a pyxley app", file=sys.stderr)
            raise
dataset/ETHPy150Open stitchfix/pyxley/pyxley/utils/npm.py/NPM.run