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
@pnpm/npm-conf: The "path" argument must be of type string
error when env.APPDATA is undefined on Windows
#6659
Comments
This bug prevents me from installing pnpm under Windows. When I execute the xxx command, the following error occurs:
I tried Is there any way to temporarily fix the error? |
@RandomByte thanks for the detailed issue. I have published a fix into |
I am facing the same issue with |
This is a report of a possible regression in the
@pnpm/npm-conf
package. We use this package as a transitive dependency ofupdate-notifier
, viaregistry-auth-token
.A user of our package reported the error described below when using it in a Windows environment were the
APPDATA
environment variable is not set (e.g. the Visual Studio Code terminal): SAP/ui5-tooling#833It looks like a regression to me, since exactly this behavior has been fixed in the original module in the past : kevva/npm-conf#7
I think the issue got re-introduced in your fork with this commit: pnpm/npm-conf@ccf74c4#diff-b34f2f53ab94368c86775969fb604e8375abe03b6a378bdd09896fd91ac0a0d2R30
pnpm version: None
@pnpm/npm-conf
version: 2.2.0Code to reproduce the issue:
Note: For the lack of a Windows system, I haven't tested this myself. But based on the report, I would expect the following code to produce the error on a Windows system:
Expected behavior:
Module should initialize fine on Windows, even if the
APPDATA
environment variable is not set.Actual behavior:
Module throws an error
The "path" argument must be of type string. Received undefined
Additional information:
node -v
prints: 18.16.0The text was updated successfully, but these errors were encountered: