Skip to content

Error.cause, possible regression from vite 3.1.4 (esnext) #10292

@belgattitude

Description

@belgattitude

Describe the bug

My tests (vitest) started to fail after update to 3.1.4. Not a big deal the workaround is simple, but I prefer to share the info.

belgattitude/http-exception#83

Seems related to the change of esbuild target in dev: refs #10215 and #10207.

It's about the Error.cause, see usage https://belgattitude.github.io/http-exception/#/?id=about-errorcause

Here's the test that fails

https://github.com/belgattitude/http-exception/blob/599fa76113c3fc53c71e935133f52cabe13423cf/packages/http-exception/src/base/__tests__/HttpException.test.ts#L36-L48

image

As a workaround I've just set explicitly the target to node14 (many targets works, just not esnext).

https://github.com/belgattitude/http-exception/pull/82/files#diff-bf307cafcebcb7d56cd0b4a3017f12f6a1ba9a768ecd1de52df5c77158cf2e78

Not knowledgeable enough to know if it's important. Just wanted to share, please feel free to close.

By the way, thanks a lot for the work you're doing 👍

Reproduction

belgattitude/http-exception#83

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 858.00 MB / 15.29 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 16.17.0 - ~/.nvm/versions/node/v16.17.0/bin/node
    Yarn: 4.0.0-rc.22 - ~/.nvm/versions/node/v16.17.0/bin/yarn
    npm: 8.15.0 - ~/.nvm/versions/node/v16.17.0/bin/npm
  Browsers:
    Chrome: 105.0.5195.125
    Firefox: 105.0.1

Used Package Manager

yarn

Logs

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions