Skip to content

bug: axios with stencil throws Cannot read properties of undefined (reading 'Z_SYNC_FLUSH') #6202

@will-hu-0

Description

@will-hu-0

Prerequisites

Stencil Version

4.28.1

Current Behavior

After upgrading to the latest stenciljs/core 4.28.1, an outstanding issue occured when using axios to fetch data..

The error is

index.js:100 TypeError: Cannot read properties of undefined (reading 'Z_SYNC_FLUSH')
    at http.js:30:25 
consoleError	@	index.js:100

The code to reproduce is pretty simple here: https://github.com/will-hu-0/stenciljs-demo-issue
Can you take a look at this? THanks.

Expected Behavior

The axios should return data back

System Info

System: node 20.13.1
    Platform: darwin (24.3.0)
   CPU Model: Apple M1 Pro (8 cpus)
    Compiler: /Users/will/Work/zComm/stenciljs-demo-issue/node_modules/@stencil/core/compiler/stencil.js
       Build: 1741825324
     Stencil: 4.28.1 🐵
  TypeScript: 5.5.4
      Rollup: 4.34.9
      Parse5: 7.2.1
      jQuery: 4.0.0-pre
      Terser: 5.37.0

Steps to Reproduce

npm run start

Code Reproduction URL

https://github.com/will-hu-0/stenciljs-demo-issue

Additional Information

No response

Metadata

Metadata

Assignees

Labels

Bug: ValidatedThis PR or Issue is verified to be a bug within Stencil

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions