Gatsby构建失败并带有promise.finally不是函数

时间:2020-07-08 19:16:13

标签: gatsby

我能够成功运行gatsby development,但是当我运行gatsby build时,它会抛出 promise。最终不是功能

我指的是此链接,以尝试多种解决方案,但并没有获得太多成功。 https://github.com/gatsbyjs/gatsby/issues/23542

盖茨比信息返回此详细信息

System:
    OS: macOS 10.14.6
    CPU: x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
  Browsers:
    Chrome: 83.0.4103.116
    Firefox: 56.0.2
    Safari: 12.1.2
  npmPackages:
    gatsby: ^2.18.25 => 2.23.22 
    gatsby-image: ^2.2.31 => 2.4.12 
    gatsby-plugin-google-analytics: ^2.1.34 => 2.3.10 
    gatsby-plugin-google-fonts: ^1.0.1 => 1.0.1 
    gatsby-plugin-google-tagmanager: ^2.1.24 => 2.3.10 
    gatsby-plugin-manifest: ^2.2.33 => 2.4.17 
    gatsby-plugin-offline: ^3.0.19 => 3.2.16 
    gatsby-plugin-react-helmet: ^3.1.14 => 3.3.9 
    gatsby-plugin-sharp: ^2.2.37 => 2.6.18 
    gatsby-source-contentful: ^2.1.69 => 2.3.24 
    gatsby-source-dev: ^0.1.4 => 0.1.4 
    gatsby-source-filesystem: ^2.1.36 => 2.3.18 
    gatsby-transformer-json: ^2.2.17 => 2.4.10 
    gatsby-transformer-sharp: ^2.3.3 => 2.5.10 
  npmGlobalPackages:
    gatsby-cli: 2.12.59

1 个答案:

答案 0 :(得分:0)

最后,我将我的gatsby版本从2.23.22降级到2.20.28,从而解决了问题

我当前的gatsby信息显示以下信息

 System:
    OS: macOS 10.14.6
    CPU: x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
  Browsers:
    Chrome: 83.0.4103.116
    Firefox: 56.0.2
    Safari: 12.1.2
  npmPackages:
    **gatsby: 2.20.28 => 2.20.28** 
    gatsby-image: ^2.2.31 => 2.4.12 
    gatsby-plugin-google-analytics: ^2.1.34 => 2.3.10 
    gatsby-plugin-google-fonts: ^1.0.1 => 1.0.1 
    gatsby-plugin-google-tagmanager: ^2.1.24 => 2.3.10 
    gatsby-plugin-manifest: ^2.2.33 => 2.4.17 
    gatsby-plugin-offline: ^3.0.19 => 3.2.16 
    gatsby-plugin-react-helmet: ^3.1.14 => 3.3.9 
    gatsby-plugin-sharp: ^2.2.37 => 2.6.18 
    gatsby-source-contentful: ^2.1.69 => 2.3.24 
    gatsby-source-dev: ^0.1.4 => 0.1.4 
    gatsby-source-filesystem: ^2.1.36 => 2.3.18 
    gatsby-transformer-json: ^2.2.17 => 2.4.10 
    gatsby-transformer-sharp: ^2.3.3 => 2.5.10