Skip to content

build script Babel Polyfill-exclusions not found #65479

@djcowan

Description

@djcowan

Description

While running @wordpress/scripts we are receiving an error when calling start or build

  • `[BABEL]: Cannot find module './polyfill-exclusions'
    current package dev/dependencies:
  1. "@wordpress/interactivity": "^6.8.0"
  2. "@wordpress/scripts": "^30.0.0",
  3. "typescript": "^5.5.4"
  4. update to op - "@wordpress/url": "^4.8.0"

Step-by-step reproduction instructions

The plugin uses a viewModuleScript and interactivity: true

  1. in plugin root - run script "packages-update": "wp-scripts packages-update"
  2. run "wp-scripts build --experimental-modules", or "wp-scripts build",

We will continue to review our setup

Screenshots, screen recording, code snippet

ERROR in ./src/dialog/view.ts
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL]: Cannot find module './polyfill-exclusions'
Require stack: 

our tsconfig

{
	"$schema": "https://json.schemastore.org/tsconfig.json",
	"compilerOptions": {
		"forceConsistentCasingInFileNames": true,
		"allowJs": true,
		"checkJs": true,
		"allowSyntheticDefaultImports": true,
		"jsx": "preserve",
		"target": "esnext",
		"module": "esnext",
		"lib": [
			"DOM",
			"DOM.Iterable",
			"ESNext"
		],
		"declaration": true,
		"declarationMap": true,
		"composite": true,
		"emitDeclarationOnly": true,
		"isolatedModules": true,
		"skipDefaultLibCheck": true,
		/* Strict Type-Checking Options */
		"strict": true,
		/* Additional Checks */
		"noImplicitReturns": true,
		"noFallthroughCasesInSwitch": true,
		/* Module Resolution Options */
		"moduleResolution": "node",
		/* This needs to be false so our types are possible to consume without setting this */
		"esModuleInterop": false,
		"resolveJsonModule": true,
		"typeRoots": [
			"./node_modules/@types"
		],
		"types": []
	},
	"include": [
		"./src",
		"./src/*"
	],
	"exclude": [
		"**/*.android.js",
		"**/*.ios.js",
		"**/*.native.js",
		"**/benchmark",
		"packages/*/build-*/**",
		"packages/*/build/**",
		"**/test/**",
		"packages/**/react-native-*/**"
	]
}

Environment info

Gutengerg Version 19.2.0
package versions as listed
NB unable to confirm:
Please confirm that you have tested with all plugins deactivated except Gutenberg.

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

Assignees

No one assigned

    Labels

    [Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions