Gatsby: Promise.map is not a function

Created on 25 Jul 2018  Â·  6Comments  Â·  Source: gatsbyjs/gatsby

Description

Promise.map is not a function when build.

Steps to reproduce

I just clone gatsby new my-default-project https://github.com/gatsbyjs/gatsby-starter-blog\#v2, gatsby-starter-blog and npm run build

You'll get this error.

  7 |       // Check if module is in cache
   8 |          if(installedModules[moduleId]) {
>  9 |              return installedModules[moduleId].exports;
     | ^
  10 |          }
  11 |          // Create a new module (and put it into the cache)
  12 |          var module = installedModules[moduleId] = {


  WebpackError: TypeError: Promise.map is not a function

  - bootstrap:9 Promise
    lib/webpack/bootstrap:9:1


  - objectWithoutProperties.js:11 new Promise
    [lib]/[@babel]/runtime/helpers/objectWithoutProperties.js:11:1

  - bootstrap:5 module.exports
    lib/webpack/bootstrap:5:1

  - bootstrap:35 webpack.run
    lib/webpack/bootstrap:35:1

Expected result

Should build successfully

Actual result

It's crashing.

bug

All 6 comments

Also seeing this after blowing away a yarn.lock and reinstalling in a 2.x based site just now. Thinking it might be related to the release ~6h ago?

Temporary fix is to add a resolutions field to package.json (if you're using yarn, like I am). Definitely beta.58 related.

  "resolutions": {
    "gatsby": "2.0.0-beta.57"
  }

(also this will crash build, but hang develop)

Yeah, I think it's the latest release causing this error, I'm currently using beta.57 for development.

Yup having the same issues here, slight panic when my build failed - confirm beta.57 works.

Just published [email protected] which should fix this.

Ref #6738

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Oppenheimer1 picture Oppenheimer1  Â·  3Comments

rossPatton picture rossPatton  Â·  3Comments

ferMartz picture ferMartz  Â·  3Comments

hobochild picture hobochild  Â·  3Comments

magicly picture magicly  Â·  3Comments