Building Gutenberg 10.2.1 fails with error "could not resolve dependency: peer @wp-g2/create-styles@"^0.0.154" from [email protected]"
Description
When I run npm ci on a local clone of Gutenberg, the install fails and I see the following error:
could not resolve dependency: peer @wp-g2/create-styles@"^0.0.154" from [email protected]
Step-by-step reproduction instructions
- Fork and clone local copy of Gutenberg
- Run
npm ciin terminal - The install should fail after a few moments and display the error message noted above in the description.
Expected behaviour
Build tools for Gutenberg to install successfully.
Actual behaviour
Build tools install failed.
Screenshots or screen recording (optional)

WordPress information
- WordPress version: n/a
- Gutenberg version: 10.2.1
- Are all plugins except Gutenberg deactivated? n/a
- Are you using a default theme (e.g. Twenty Twenty-One)? n/a
Device information
- Device: Desktop
- Operating system: WSL2 on Windows 10
- Browser: n/a
@chthonic-ds Which version of node and npm are you using?
@talldan
- node 15.3.0
- npm 7.0.14
From what I understand, npm 7 isn't compatible at the moment. There are a few issues open:
https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+label%3A%22%5BType%5D+Build+Tooling%22+npm
Using node 14 and npm 6 should resolve the problem.
For anyone in future experiencing this issue, can confirm running node 14 with npm 6:
- resolved this issue
- was followed by a new one
If you experience a bunch of errors of the nature, "ENOENT: no such file or directory...", try the solution in this comment, worked for me: https://github.com/WordPress/gutenberg/issues/9474#issuecomment-420107785