Creation of probot.github app failing with Error: The programmatic API was removed in npm v8.0.0
Asked Answered
T

1

8

I am trying to install probot.github app using the command npx create-probot-app my-first-app from the link: https://probot.github.io/docs/development/. I am using the latest node v19.3.0 with npm version 9.2.0. But the app is not getting created and is failing with the error

npm WARN deprecated [email protected]: cross-spawn no longer requires a build toolchain, use it instead
/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/npm/index.js:4
  throw new Error('The programmatic API was removed in npm v8.0.0')
  ^

Error: The programmatic API was removed in npm v8.0.0
    at Object.<anonymous> (/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/npm/index.js:4:9)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/create-probot-app/bin/helpers/run-npm.js:7:31)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
    at Module.load (node:internal/modules/cjs/loader:1081:32)
    at Module._load (node:internal/modules/cjs/loader:922:12)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/user1/.npm/_npx/ac7da0f8d6e6b5c7/node_modules/create-probot-app/bin/create-probot-app.js:15:19)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)

I tried downgrading npm version to 6 and 7 as well by downloading lower versions of node. Still it throws the same error. Any help?

Tempa answered 28/12, 2022 at 0:46 Comment(0)
M
15

it's not a solution but workaround: previous version worked, so use this instead:

npx [email protected]

Moralist answered 29/12, 2022 at 10:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.