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

[BUG] Windows: npm is unable to access .npmrc when it's set to hidden #768

Closed
MilesBHuff opened this issue Feb 4, 2020 · 2 comments
Closed
Labels
Bug thing that needs fixing platform:windows is Windows-specific

Comments

@MilesBHuff
Copy link

  • Version: node: v10.18.1; npm: 6.13.4
  • Platform: Windows 10 64-bit
  • Subsystem: npm install

As we all know, on POSIX systems, putting a dot before a file's name makes it "hidden". In Windows, it works a bit differently: dots don't hide files, but there is a properties checkbox that does. When you set .npmrc to "hidden" in this way on a Windows machine, npm reports the following error: Error: EPERM: operation not permitted, open $HOME/.npmrc. According to nodejs/node#5261, which was fixed, the same issue previously existed for .node_repl_history. Can you fix it for .npmrc too?

(Bug report moved from nodejs/node#31634)

@yanoryuichi
Copy link

Hidden attribute in Windows is different from dot files in UNIX, it's a kind of ACL setting by SELinux. Putting config files under %USERPROFILE% is a bad way in Windows in the first place. They should be under %APPDATA%, that's hidden by default. Users don't see .npmrc and not need to set it to hidden. It's the same problem in yarn. yarnpkg/yarn#8403

@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing platform:windows is Windows-specific
Projects
None yet
Development

No branches or pull requests

3 participants