Gutenberg: wp-env: config.pluginSources.flatMap is not a function

Created on 5 Mar 2020  路  4Comments  路  Source: WordPress/gutenberg

Describe the bug
I have just installed wp-env on macOS (Catalina) using the instructions from the documentation. Every time I run wp-env start I get the following error (with and without a .wp-env.json):

config.pluginSources.flatMap is not a function
TypeError: config.pluginSources.flatMap is not a function
    at buildDockerComposeConfig (/usr/local/lib/node_modules/@wordpress/env/lib/build-docker-compose-config.js:20:44)
    at initConfig (/usr/local/lib/node_modules/@wordpress/env/lib/env.js:316:30)
[Type] Help Request

Most helpful comment

@slaFFik It looks like flatMap was added in Node 11.0. I agree it would be good to have a notice somewhere about the minimum requirements (probably during installation).

All 4 comments

I think you're probably using an old node version. Which version are you on?

Yep, that was it 馃憤 I was using Node v10.17. After upgrading to Node v13 and re-installing it works. Thanks.

@gilbitron What is the min node version needed for this package?
It would be nice to have this info at least somewhere (or better notify on package installation as an error).

@slaFFik It looks like flatMap was added in Node 11.0. I agree it would be good to have a notice somewhere about the minimum requirements (probably during installation).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aaronjorbin picture aaronjorbin  路  3Comments

franz-josef-kaiser picture franz-josef-kaiser  路  3Comments

moorscode picture moorscode  路  3Comments

nylen picture nylen  路  3Comments

JohnPixle picture JohnPixle  路  3Comments