close
Skip to content

Typescript error is preventing the building of Gutenberg project #64002

@matiasbenedetto

Description

@matiasbenedetto

Description

:~/dev/gutenberg$ npm run dev

> gutenberg@18.9.0-rc.1 dev
> cross-env NODE_ENV=development npm run build:packages && concurrently "wp-scripts start" "npm run dev:packages"


> gutenberg@18.9.0-rc.1 prebuild:packages
> npm run clean:packages && lerna run build


> gutenberg@18.9.0-rc.1 clean:packages
> rimraf "./packages/*/@(build|build-module|build-style)"

lerna notice cli v7.1.4
lerna info versioning independent
 
    ✔  @wordpress/block-serialization-spec-parser:build (423ms)
    ✔  @wordpress/babel-preset-default:build (2s)

 ————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  Lerna (powered by Nx)   Successfully ran target build for 2 projects (2s)
 

> gutenberg@18.9.0-rc.1 build:packages
> npm run --silent build:package-types && node ./bin/packages/build.js

packages/components/node_modules/framer-motion/dist/index.d.ts:1203:11 - error TS2430: Interface 'CSSStyleDeclarationWithTransform' incorrectly extends interface 'Omit<CSSStyleDeclaration, "direction" | "transition">'.
  Types of property 'x' are incompatible.
    Type 'string | number' is not assignable to type 'string'.
      Type 'number' is not assignable to type 'string'.

1203 interface CSSStyleDeclarationWithTransform extends Omit<CSSStyleDeclaration, "direction" | "transition"> {
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Step-by-step reproduction instructions

  1. Remove your node modules folder rm -r node_modules
  2. Reinstall the packages npm install
  3. Try to build the project npm run dev
  4. You will receive an error like the above.

Screenshots, screen recording, code snippet

No response

Environment info

  • Gutenberg trunk
  • Node 20.16
  • Ubuntu 22.04

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Metadata

Metadata

Labels

[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intendednpm PackagesRelated to npm packages

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions