我正在尝试安装probot。github应用程序使用命令npx create-probot-app my-first-app
从链接:https://probot.github.io/docs/development/。我使用的是最新的节点v19.3.0和npm版本9.2.0。但是应用程序没有创建,并且出现以下错误
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)
我试着下载较低版本的node,把npm的版本降到6和7,但还是会出现同样的错误,有帮助吗?
1条答案
按热度按时间wd2eg0qa1#
这不是解决方案,而是变通方法:以前的版本工作,所以使用这个代替:
第一个月