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)
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).
Most helpful comment
@slaFFik It looks like
flatMapwas added in Node 11.0. I agree it would be good to have a notice somewhere about the minimum requirements (probably during installation).