简体   繁体   English

尝试使用 ng new myProject 创建新的 angular 项目时出错

[英]Error when trying to create a new angular project using ng new myProject

this is the error issue i've got after type the commande npm new project0这是我在输入命令 npm new project0 后遇到的错误问题

npm ERR! path D:\Polytech\Génie Informatique\2- Génie Informatique 4\Programmation Web\Angular\project0\node_modules\js-yaml\bin\js-yaml.jsnpm
ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod                

npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\Polytech\Génie Informatique\2- Génie Informatique 4\Programmation Web\Angular\project0\node_modules\js-yaml\bin\js-yaml.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\awouf\AppData\Roaming\npm-cache\_logs\2019-11-22T08_25_38_203Z-debug.log
Package install failed, see above.

You should try following您应该尝试以下

    npm install angular/cli      //This command will install your angular/cli locally
    ng new project0              //This will create new angular/cli project
    cd project0                  //You will have to CD into project directory
    ng serve --open              // Run your application and open browser

You can look into Angular cli documentation for more info https://cli.angular.io/您可以查看 Angular cli 文档以获取更多信息https://cli.angular.io/

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

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