如何在尝试运行节点web-server.js时修复错误

时间:2013-11-18 14:03:26

标签: node.js angularjs powershell

我已经通过Win8 powershell安装了node.js,现在想要运行AngularJS教程附带的web-server.js。但是,这次围绕Windows8 Powershell的行为与我在Win7中的体验有所不同 - 我得到的以下错误:

C:\Users\xx\angular-phonecat\scripts [master +24 ~0 -0 !]> web-server.js
web-server.js : The term 'web-server.js' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ web-server.js
+ ~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (web-server.js:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


Suggestion [3,General]: The command web-server.js was not found, but does exist in the current location. Windows PowerShell does not load commands from the current location by default. If you trust this command, instead type ".\web-server.js". See "get-help about_Command_Precedence" for more details.

1 个答案:

答案 0 :(得分:0)

您必须使用以下命令运行:

node web-server.js
is not recognized as the name of a cmdlet, function, script fil
相关问题