You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Botonic框架创建项目时NPM依赖安装报错求助

Botonic创建空白项目时依赖安装失败的解决办法

已成功安装Botonic框架,但执行命令 botonic new myBot blank 创建空白项目时,依赖安装环节出现大量NPM错误,报错详情如下:

~Jhenriqueax🚀: botonic new myBot blank
✔ Downloading files...
✖ Installing dependencies...
Your message must be < 32kb. This is currently surfaced as a warning to allow clients to update. Versions released after August 1, 2018 will throw an error instead. Please update your code before then. {
  event: 'Error Botonic CLI',
  anonymousId: 87047954,
  properties: {
    platform: 'darwin',
    arch: 'arm64',
    timezone: 'America/Fortaleza',
    timestamp: '2023-01-18T21:45:38.995Z',
    is_tty: true,
    framework_path: '/usr/local/lib/node_modules/@botonic/cli/lib',
    system_path: '/opt/homebrew/bin:/opt/homebrew/sbin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/jhenriqueax/Development/flutter/bin:/Library/Apple/usr/bin',
    node_version: 'v16.14.2',
    botonic_cli_version: '0.20.2',
    botonic_dependencies: [ [Array] ],
    error_type: 'Installing dependencies: Error: Command failed: CXXFLAGS="--std=c++14" npm install\n' +
      'npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated\n' +

解决步骤

  • 清理npm缓存:执行 npm cache clean --force,清理完成后重新运行项目创建命令
  • 升级npm版本:当前Node版本为v16.14.2,可升级npm到对应稳定版,执行 npm install -g npm@latest
  • 手动安装依赖:先跳过自动安装创建项目,执行 botonic new myBot blank --skip-install,进入项目目录 cd myBot 后手动执行 npm install;若仍有编译问题,确保Mac已安装Xcode命令行工具:xcode-select --install
  • 升级Botonic CLI:当前CLI版本为0.20.2,执行 npm install -g @botonic/cli@latest 升级到最新稳定版后重试

内容的提问来源于stack exchange,提问作者João Henrique Almeida Xavier

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 14:35:27