Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upng update on windows fails when cli version wants to preinstall | loader.js | Cannot find module #18891
Comments
Related to #17870 |
This comment was marked as spam.
This comment was marked as spam.
Angular CLI: 10.1.1 Angular: 10.1.1 Package Version@angular-devkit/architect 0.1001.1 |
$ ng update Error: Cannot find module 'C:\Users\Firstname' |
Command (mark with an
x
)Is this a regression?
Yes, the previous version in which this bug was not present was: 6, 7, partially in 8 (depend on the cli version)Description
A user directory on windows is 'C:\Users\Firstname Lastname...' - what mean it includes a whitespace between the first and last name. When the given project has not the latest cli version installed, a temporary install happen of the lastes cli version to use it for ng update. Then the following error happen (I holde it generic by using "Firstname Lastname":
Have a windows system where the user name uses a whitespace (like "Firstname Lastname" or "John Doe") and an Angular project that has not the latest cli installed. Run
ng update
.Anything else relevant?
To use
ng update
it is possible to update the local pacakge to latest version by increasing it in package.json by hand and do annpm install
. Then with the lastest versionng update
always works. It is the problem with the mechanism to preinstall the lastes version onng update
command.I also tried to route the global node_modules to a different folder. That works for all global packages, but not for that command. It will always use the users directory.