英文:
Angular ng no such file or directory
问题
我正在尝试在服务器上部署一个Angular应用程序,问题是,ng serve命令报错"找不到文件或目录",但ng命令存在,参见下面的图片链接:
英文:
i'm trying to serve an angular app in a server, the thing is, the command ng serve throws the "No such file or directory" but the ng is there, see image below .
答案1
得分: 1
你需要回到package.json文件所在的级别,并全局安装Angular CLI。
英文:
You need to 'cd' back to the level of the package.json file and have angular Cli installed globally.
答案2
得分: 0
尝试按以下方式执行:
/node_modules/@angular/cli/bin/ng serve
由于您没有全局安装它,它只在此项目环境中可用。
英文:
Try to execute it like this:
/node_modules/@angular/cli/bin/ng serve
Since you didn't installed it globally it is only available in this project environment.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论