probot / ideas

Share ideas for new GitHub Apps built with Probot
96 stars 48 forks source link

Creation of probot.github app failing with Error: The programmatic API was removed in npm v8.0.0 #138

Closed Jijo070 closed 1 year ago

Jijo070 commented 1 year ago

1

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 cross-spawn-async@2.2.5: 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?