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

ng update fails when windows username contains a space #16865

Closed
simeyla opened this issue Feb 7, 2020 · 1 comment · Fixed by #16880
Closed

ng update fails when windows username contains a space #16865

simeyla opened this issue Feb 7, 2020 · 1 comment · Fixed by #16880
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@simeyla
Copy link

simeyla commented Feb 7, 2020

🐞 bug report

Affected Package

ng update

Is this a regression?

Never seen before.

Good news

This appears to be fixed once updating to latest version - but since the error is observed when trying to do precisely that I thought the solution below may help others.

Description

My Windows user account contains a space, and specifically my temp directories are:

TEMP=C:\Users\Simon Weaver\AppData\Local\Temp
TMP=C:\Users\Simon Weaver\AppData\Local\Temp

When running ng update to update to Angular 9 I get the log below - due to the space.

Most notable line:
Could not install from "Weaver\AppData\Local\T...

🔬 Minimal Reproduction

I'm only able to provide the logging as follows:

PS S:\tfs\rr\Defender.NG> ng update --verbose
Locating potential npmrc files:
Trying 'C:\Program Files\nodejs\etc\npmrc'...not found.
Trying 'C:\Users\Simon Weaver\.npmrc'...not found.
Trying 'S:\tfs\.npmrc'...not found.
Trying 'S:\tfs\rr\.npmrc'...not found.
Trying 'S:\tfs\rr\Defender.NG\.npmrc'...not found.
The installed Angular CLI version is older than the latest stable version.
Installing a temporary version to perform the update.
Installing packages for tooling via npm.
An unhandled exception occurred: npm ERR! code ENOLOCAL
npm ERR! Could not install from "Weaver\AppData\Local\Temp\.ng-temp-packages-h9b5YS" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Simon Weaver\AppData\Roaming\npm-cache\_logs\2020-02-07T06_00_18_234Z-debug.log

So pretty obviously something somewhere is blowing up because of the space in my username.

🌍 Your Environment

This was discovered on 8.2.14 but not sure the CLI version at the time.
Also I'm not clear if this issue is already fixed.

Workaround

I just created a folder c:\temp\angulartemp and set the environmental variables

set tmp=c:\temp\angulartemp
set temp=c:\temp\angulartemp

I was then able to follow the install instructions for ng update and everything went great :-)

@alan-agius4 alan-agius4 transferred this issue from angular/angular Feb 7, 2020
@alan-agius4 alan-agius4 added area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix labels Feb 7, 2020
@ngbot ngbot bot modified the milestone: Backlog Feb 7, 2020
@filipesilva filipesilva modified the milestones: Backlog, 9.0.x Feb 7, 2020
@clydin clydin self-assigned this Feb 7, 2020
clydin added a commit to clydin/angular-cli that referenced this issue Feb 7, 2020
dgp1130 pushed a commit that referenced this issue Feb 11, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 13, 2020
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular/cli freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants