我在Angular Broject中工作,而NPM Run服务器不起作用

发布于 2025-01-21 17:04:34 字数 680 浏览 0 评论 0 原文

(c)Microsoft Corporation。版权所有。

c:\ users \ home> cd 3-services 系统找不到指定的路径。

c:\ users \ home> cd 3-services

c:\ users \ home \ home \ 3-services> cd 3-services

c:\ users \ home \ home \ 3-services \ 3-services \ 3-services> npm Run Server

'。不公认为内部或外部命令, 可操作的程序或批处理文件。

C:\ Users \ Home \ 3-Services \ 3-Services>

(c) Microsoft Corporation. All rights reserved.

C:\Users\home>cd 3-services
The system cannot find the path specified.

C:\Users\home>cd 3-services

C:\Users\home\3-services>cd 3-services

C:\Users\home\3-services\3-services>npm run server

[email protected] server
./node_modules/.bin/ts-node -P ./server.tsconfig.json ./server.ts

'.' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\home\3-services\3-services>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

动次打次papapa 2025-01-28 17:04:34

在PC的环境中设置NodeJS路径。

  1. 搜索Windows搜索中的环境变量

  2. 编辑系统环境变量”选项将在结果中弹出

  3. ,选择“路径”,然后单击“编辑”,然后单击“ new”添加您的
    nodejs bin路径IE在我的计算机中安装在

      c:\ programFiles \ nodejs \ node_modules \ npm \ bin
     
  4. 中,一旦添加单击“确定”,然后关闭

,您可以在提示或PowerShell中写下命令。

有时需要重新启动PC。

Set the nodejs path in environment of your PC.

  1. Search for Environment Variables in the Windows search

  2. Edit the System environment variables" option will be popped in the result

  3. Open that, select the "Path" and click on edit, then click "New" add your
    nodeJS Bin path i.e in my machine its installed in

    c:\programfiles\nodejs\node_modules\npm\bin
    
  4. Once you added click "Ok" then close

Now you can write your command in prompt or PowerShell.

Sometime it's required to restart the PC.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文