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

error using npm with escape character in user path folder #33509

Closed
IR4N0nY opened this issue May 22, 2020 · 1 comment
Closed

error using npm with escape character in user path folder #33509

IR4N0nY opened this issue May 22, 2020 · 1 comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. wrong repo Issues that should be opened in another repository.

Comments

@IR4N0nY
Copy link

IR4N0nY commented May 22, 2020

hi
unfortunately i have and & in my username in windows and appdata path in my system is =
c:\users\s&a....
when i want to run "ng upate" on my app or any other app with powershell they give me an error like this:

Installing packages for tooling via npm.
Error: EPERM: operation not permitted, mkdir 'C:\Users\s'
The system cannot find the path specified.
An unhandled exception occurred: Package install failed, see above.
See "C:\Users\s&a\AppData\Local\Temp\ng-3iALVs\angular-errors.log" for further details.

i try to rewrite $ENV:APPDATA in my powershell but that was not helpful
in cmd i got this error:

'a\AppData\Roaming\npm\' is not recognized as an internal or external command,
operable program or batch file.
internal/modules/cjs/loader.js:1032
  throw err;
  ^

Error: Cannot find module 'C:\Users\s\node_modules\@angular\cli\bin\ng'
�[90m    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:1029:15)�[39m
�[90m    at Function.Module._load (internal/modules/cjs/loader.js:898:27)�[39m
�[90m    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)�[39m
�[90m    at internal/main/run_main_module.js:17:47�[39m {
  code: �[32m'MODULE_NOT_FOUND'�[39m,
  requireStack: []
}

and cant update ro install any thing
my node version = 14.3.0
is there any suggestion to fix this issue?

@targos
Copy link
Member

targos commented May 23, 2020

Hello,

This is not really an issue with Node.js, but with a script generated by npm when a CLI is installed.
I do not know if or how this can be fixed, but here's the package that creates the .cmd wrappers for npm "bin" scripts. An issue is already opened there: npm/cmd-shim#45

@targos targos closed this as completed May 23, 2020
@targos targos added wrong repo Issues that should be opened in another repository. npm Issues and PRs related to the npm client dependency or the npm registry. labels May 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Issues and PRs related to the npm client dependency or the npm registry. wrong repo Issues that should be opened in another repository.
Projects
None yet
Development

No branches or pull requests

2 participants