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 Yarn 3.2.1 TypeError for path with Node 18 #29

Closed
2 tasks done
troncali opened this issue Jul 12, 2022 · 0 comments · Fixed by #52
Closed
2 tasks done

Fix Yarn 3.2.1 TypeError for path with Node 18 #29

troncali opened this issue Jul 12, 2022 · 0 comments · Fixed by #52
Assignees
Labels
bug Something isn't working
Milestone

Comments

@troncali
Copy link
Owner

As described in @yarnpkg/berry Issue #1818, using Yarn 3.2.1 with Node 18 can sometimes throw the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Buffer
    at new NodeError (node:internal/errors:388:5)
    at validateString (node:internal/validators:114:11)
    at Object.isAbsolute (node:path:1157:5)
    at VirtualFS.mapToBase (.../Code/nest-vue/.pnp.cjs:31524:24)
    at VirtualFS.rmdirSync (.../Code/nest-vue/.pnp.cjs:31367:39)
    at PosixFS.rmdirSync (.../Code/nest-vue/.pnp.cjs:31367:24)
    at URLFS.rmdirSync (.../Code/nest-vue/.pnp.cjs:31367:24)
    at _rmdirSync (node:internal/fs/rimraf:260:21)
    at rimrafSync (node:internal/fs/rimraf:193:7)
    at node:internal/fs/rimraf:253:9 {
  code: 'ERR_INVALID_ARG_TYPE'
}

See troncali/yarn-3.2.1-pnp-patch for explanation of fix.

Tasks:

  • Investigate issue
  • Implement fix
@troncali troncali self-assigned this Jul 12, 2022
@troncali troncali added the bug Something isn't working label Jul 12, 2022
@troncali troncali added this to the 1.0.0 milestone Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✓ Done
Development

Successfully merging a pull request may close this issue.

1 participant