[wp-trac] [WordPress Trac] #63606: npm run dev: Warning: Maximum call stack size exceeded

WordPress Trac noreply at wordpress.org
Wed Jan 28 17:52:11 UTC 2026


#63606: npm run dev: Warning: Maximum call stack size exceeded
-------------------------------------------------+-------------------------
 Reporter:  SirLouen                             |       Owner:
                                                 |  SergeyBiryukov
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  7.0
Component:  Build/Test Tools                     |     Version:  3.7
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-test-info needs-       |     Focuses:
  testing 2nd-opinion                            |
-------------------------------------------------+-------------------------

Comment (by westonruter):

 In [changeset:"61545" 61545]:
 {{{
 #!CommitTicketReference repository="" revision="61545"
 Build/Test Tools: Optimize `uglify:core` and `copy:files` glob patterns in
 Grunt tasks.

 The `uglify:core` and `copy:files` tasks utilized broad negative glob
 patterns (`!**/*.min.js` and `!**/*.map`) to exclude files from
 processing. The glob expansion scans the entire `src/` directory tree,
 including `wp-content`. For environments where `wp-content` contains deep
 directory structures (such as plugins with `node_modules` dependencies)
 this traversal becomes prohibitively slow, causing the build process to
 hang.

 This change scopes the exclusion patterns to specific directories (e.g.
 `wp-admin`, `wp-includes`, default themes, and Akismet), limiting the file
 scan to relevant core paths and preventing unnecessary recursion into `wp-
 content`.

 In one dev environment, this reduces `npm run build:dev` from 43s to 9s,
 and `npm run build` from 51s to 13s.

 Developed in https://github.com/WordPress/wordpress-develop/pull/10809

 Follow up to [61475].

 Props westonruter, jonsurrell.
 See #63606.
 Fixes #64563.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63606#comment:12>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list