Skip to content

fix: Uuid on AnonymousUtils.js #1650

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

Closed
wants to merge 1 commit into from
Closed

Conversation

xPetrvs
Copy link

@xPetrvs xPetrvs commented Jan 7, 2023

New Pull Request Checklist

Issue Description

Closes: #1491

This PR fix this error :

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports" in /PATH/node_modules/uuid/package.json
at new NodeError (node:internal/errors:400:5)
at exportsNotFound (node:internal/modules/esm/resolve:361:10)
at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
at resolveExports (node:internal/modules/cjs/loader:538:36)
at Module._findPath (node:internal/modules/cjs/loader:607:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object. (/PATH/node_modules/parse/lib/node/AnonymousUtils.js:27:16) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Approach

TODOs before merging

  • Add tests
  • Add changes to documentation (guides, repository pages, in-code descriptions)

This PR fix this error :

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './v4' is not defined by "exports" in /PATH/node_modules/uuid/package.json
    at new NodeError (node:internal/errors:400:5)
    at exportsNotFound (node:internal/modules/esm/resolve:361:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:697:9)
    at resolveExports (node:internal/modules/cjs/loader:538:36)
    at Module._findPath (node:internal/modules/cjs/loader:607:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/PATH/node_modules/parse/lib/node/AnonymousUtils.js:27:16) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
@parse-github-assistant
Copy link

I will reformat the title to use the proper commit message syntax.

@parse-github-assistant parse-github-assistant bot changed the title fix: uuid on AnonymousUtils.js fix: Uuid on AnonymousUtils.js Jan 7, 2023
@parse-github-assistant
Copy link

parse-github-assistant bot commented Jan 7, 2023

Thanks for opening this pull request!

  • 🎉 We are excited about your hands-on contribution!

@mtrezza mtrezza mentioned this pull request Jan 7, 2023
4 tasks
@codecov
Copy link

codecov bot commented Jan 7, 2023

Codecov Report

Base: 99.89% // Head: 99.89% // No change to project coverage 👍

Coverage data is based on head (42537be) compared to base (dfb5196).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha    #1650   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files          61       61           
  Lines        5973     5973           
  Branches     1367     1367           
=======================================
  Hits         5967     5967           
  Misses          6        6           
Impacted Files Coverage Δ
src/AnonymousUtils.js 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mtrezza mtrezza requested a review from a team January 7, 2023 22:41
@xPetrvs
Copy link
Author

xPetrvs commented Jan 7, 2023

I don't know why it's not passing the tests on 16.18.1, all I know is that the official version was not working on my 18.13 version, and with my fix now it works.

@mtrezza
Copy link
Member

mtrezza commented Jan 7, 2023

This is probably just a flaky test. Could you add a test that demonstrates the issue? The CI is testing with Node 18.12.1 and all tests pass also without this fix. So we'd need to see why this doesn't work. Could you please also open an issue for this PR - it asks for fundamental infos that help to analyze the issue.

@dplewis
Copy link
Member

dplewis commented Jan 7, 2023

@Hayrudz I believe this PR is a better fix just needs some clean up. Can you see if it fixes your issue.

@mtrezza
Copy link
Member

mtrezza commented Jan 7, 2023

Closing in favor of #1582

@mtrezza mtrezza closed this Jan 7, 2023
@xPetrvs
Copy link
Author

xPetrvs commented Jan 7, 2023

@dplewis the PR #1582 is doing the same thing than me but in a different file, and also do few other changes so I can't tell.
All I know is by doing this single change in AnonymousUtils.js it fix my error, no need to do other fixes from my side, but if you think that #1582 fix this error with a better way, let's goooo!

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

Successfully merging this pull request may close these issues.

UUID/v4 require() uses a deprecated approach, can cause issues with other packages
3 participants