简体   繁体   English

创建新的 Angular 项目失败:ENOENT:没有这样的文件或目录

[英]Creating a New Angular Project Fails: ENOENT: no such file or directory

I'm new to javascript, and I want to create a new Angular project as shown in the VS Code tutorial I've looked at this and this which did not help.我是 javascript 新手,我想创建一个新的 Angular 项目,如VS Code 教程中所示,我已经看过这个这个没有帮助。 I followed the instruction ins the VS Code tutorial exactly, I've even uninstalled/reinstalled nodejs and angular.我完全按照 VS Code 教程中的说明进行操作,我什至卸载/重新安装了 nodejs 和 angular。 What am I doing wrong?我究竟做错了什么? The only reason I can think that this is not working is that there is some compatability issue that I cannot find.我认为这不起作用的唯一原因是我找不到一些兼容性问题。 Mypowershell output: Mypowershell 输出:

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 8.3.20
Node: 12.13.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.803.20
@angular-devkit/core         8.3.20
@angular-devkit/schematics   8.3.20
@schematics/angular          8.3.20
@schematics/update           0.803.20
rxjs                         6.4.0

PS C:\Users\Path> ng new my-app
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
ENOENT: no such file or directory, mkdir 'C:\Users\Path>my-app'

Thanks in advance.提前致谢。

So quick fix was I needed to be within my home directory to create the app:所以快速修复是我需要在我的主目录中创建应用程序:

PS C:\\Users\\username\\

Don't know why this works.不知道为什么这有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM