Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] bug based on node version #840

Open
3 tasks done
HongChaeMin opened this issue May 31, 2024 · 2 comments
Open
3 tasks done

[fix] bug based on node version #840

HongChaeMin opened this issue May 31, 2024 · 2 comments
Labels

Comments

@HongChaeMin
Copy link

HongChaeMin commented May 31, 2024

Describe the bug

Node.js version: v22.1.0

OS version: MacOS Sonoma 14.4.1(23E224)

Description: From node 22 version, Array.isArray has been deprecated (https://nodejs.org/api/deprecations.html)

request(app.getHttpServer())
    .post(router)
    .set('Content-Type', 'multipart/form-data')
    .field('country', data.country)
    .field('businessLocation', data.businessLocation)
    .attach('file', 'test/resources/image.png')
    .expect(HttpStatus.CREATED)
    .expect(({ body }) => {
        expect(body).toBeDefined();
    });
(node:13214) [DEP0044] DeprecationWarning: The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

When you run code on Webstorm, get the above log and when you run it on cli, get the log Aborted.
Maybe using isArrayinside the field and attach functions.

Checklist

  • I have searched through GitHub issues for similar issues.
  • I have completely read through the README and documentation.
  • I have tested my code with the latest version of Node.js and this package and confirmed it is still not working.
@HongChaeMin HongChaeMin changed the title [fix] DESCRIPTIVE TITLE [fix] bug based on node version May 31, 2024
@j-maynard
Copy link

I can confirm this issue... The issue rests with the dependency on the form-data 4.0 package which makes use of this call.

@HongChaeMin
Copy link
Author

I can confirm this issue... The issue rests with the dependency on the form-data 4.0 package which makes use of this call.

Thanks for the comment. can i fix this? Or should I wait for the version to be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants