Skip to content

Cannot destructure property 'time' of 'stats.toJson(...)' as it is null. #854

@ra1nj

Description

@ra1nj

Describe the bug

Upgrade the repack version to 5.0.0-rc.5, encountered:

[DevServer] Cannot destructure property 'time' of 'stats.toJson(...)' as it is null. {
  reqId: 'req-1',
  err: {
    type: 'TypeError',
    message: "Cannot destructure property 'time' of 'stats.toJson(...)' as it is null.",
    stack: "TypeError: Cannot destructure property 'time' of 'stats.toJson(...)' as it is null.\n" +
      '    at Object.fn (/Users/vn564c0/Repack/RepackApp1/node_modules/@callstack/repack/dist/plugins/LoggerPlugin.js:124:11)\n' +
      '    at next (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:523:25)\n' +
      '    at AsyncSeriesHook.callAsyncStageRange (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:543:9)\n' +
      '    at AsyncSeriesHook.callAsync (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:82:21)\n' +
      '    at Watching._done (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/core/dist/index.js:13245:30)\n' +
      '    at onCompile (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/core/dist/index.js:13215:14)\n' +
      '    at /Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/core/dist/index.js:13805:18\n' +
      '    at done (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:473:13)\n' +
      '    at AsyncSeriesHook.callAsyncStageRange (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:480:20)\n' +
      '    at AsyncSeriesHook.callAsync (/Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/lite-tapable/dist/index.js:82:21)\n' +
      '    at /Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/core/dist/index.js:13801:33\n' +
      '    at /Users/vn564c0/Repack/RepackApp1/node_modules/@rspack/core/dist/index.js:13845:37'
  }
} 

System Info

N/A

Re.Pack Version

5.0.0.rc.5

Reproduction

https://github.com/ra1nj/RepackHost/tree/rc.5 , https://github.com/ra1nj/RepackApp1/tree/rc.5

Steps to reproduce

  1. Clone the repo
  2. Install dependencies
  3. Run the dev server for the RepackApp1

Metadata

Metadata

Assignees

Labels

status:investigatingThe issue needs more research and information.type:bugA bug report.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions