Skip to content

Error in building ninja /bin/sh: python: command not found #5672

Closed
@mununki

Description

@mununki

When I tried to run npm install, I face the build error since the ninja is vendor instead of submodule.
python3 is installed on my machine but python@2. I tried to added an alias, but no gain.

OS: macOS on Apple silicon M1

> rescript@10.1.0-alpha.2 postinstall
> node scripts/install.js

building ninja
/bin/sh: python: command not found
node:child_process:903
    throw err;
    ^

Error: Command failed: python configure.py --bootstrap --verbose
    at checkExecSyncError (node:child_process:826:11)
    at Object.execSync (node:child_process:900:15)
    at Object.<anonymous> (/Users/woonki/Github/projects/rescript-compiler/scripts/buildNinjaBinary.js:18:17)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at build_ninja (/Users/woonki/Github/projects/rescript-compiler/scripts/install.js:67:7) {
  status: 127,
  signal: null,
  output: [ null, null, null ],
  pid: 7079,
  stdout: null,
  stderr: null
}
npm ERR! code 1
npm ERR! path /Users/woonki/Github/projects/rescript-compiler
npm ERR! command failed
npm ERR! command sh -c node scripts/install.js

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/woonki/.npm/_logs/2022-09-19T13_49_03_621Z-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions