javascript - why I have this error bash ng command not found while I already installed the angular-cli
问题描述
my problem is that after installing angular CLI and started working with angular something happened and the ng command became not found command:
ng serve -o
please check this picture: bash: ng: command not found
but when I write it with the npx command it works:
npx ng serve -o
does anyone knows why?
解决方案
Are you sure that Angular is globally installed in your machine? If no; try this :
npm install -g @angular/cli
if yes; the problem can be due to the reason that npm is unable to find ng command, you can try linking the angular/cli to npm like this :
npm link @angular/cli
推荐阅读
- reactjs - React 测试库未渲染所有元素
- python - 在 Jupyter 上运行 sql 的问题
- windows - QWebEngineView 在干净的 Windows 安装中关闭应用程序而不会出错,但在开发 Windows 中工作正常(QT 创建者所在的位置)
- jestjs - 开玩笑 mockImplementation 总是返回 undefined
- android - android 11 媒体播放器通知问题
- woocommerce - woocommerce 单一和归档功能在索引页面上运行良好,但在其他页面上不起作用
- magento-1.9 - IDS Connect 的 Magento 集成
- python - 多个几何图形的 Open3D 可视化
- python - 保存已清理的数据框 python
- flutter - 我如何解决颤振中的昼夜主题问题?