gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Building Gutenberg 10.2.1 fails with error "could not resolve dependency: peer @wp-g2/create-styles@"^0.0.154" from [email protected]"

Open chthonic-ds opened this issue 5 years ago • 4 comments

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

  1. Fork and clone local copy of Gutenberg
  2. Run npm ci in terminal
  3. 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)

gutenberg-npm-ci-failure

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 avatar Mar 19 '21 01:03 chthonic-ds

@chthonic-ds Which version of node and npm are you using?

talldan avatar Mar 19 '21 03:03 talldan

@talldan

  • node 15.3.0
  • npm 7.0.14

chthonic-ds avatar Mar 19 '21 03:03 chthonic-ds

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.

talldan avatar Mar 19 '21 04:03 talldan

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

chthonic-ds avatar Mar 19 '21 07:03 chthonic-ds