Angular ng没有这个文件或目录

huangapple go评论67阅读模式
英文:

Angular ng no such file or directory

问题

我正在尝试在服务器上部署一个Angular应用程序,问题是,ng serve命令报错"找不到文件或目录",但ng命令存在,参见下面的图片链接:

Angular 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 .

Angular ng没有这个文件或目录

答案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.

huangapple
  • 本文由 发表于 2020年1月7日 00:05:48
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615288.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定