在PowerShell中发出运行Ionic命令的问题 [英] Issue running Ionic commands in PowerShell

查看:536
本文介绍了在PowerShell中发出运行Ionic命令的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在PowerShell中运行离子命令时,我收到错误消息

When I try to run an ionic command in PowerShell I get an error that says

离子:术语离子不被识别为cmdlet的名称,功能,脚本文件或可操作程序。检查
名称的拼写,或者如果包含路径,请验证路径是否正确,然后重试。
在行:1 char:1
+ ionic
+ ~~~~~
+ CategoryInfo:ObjectNotFound :( ionic:String)[],CommandNotFoundException
+ FullyQualifiedErrorId:CommandNotFoundException

ionic : The term 'ionic' 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 + ionic + ~~~~~ + CategoryInfo : ObjectNotFound: (ionic:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException

有谁知道如何解决这个问题?我是否需要在环境变量中添加路径变量?

Does anyone know how I can fix this? Do I need to add a path variable to my environment variables?

我已经成功安装了node.js,我相信已经成功安装了Ionic和Cordova以及命令 npm install -g ion cordova

I have installed node.js successfully and I believe have successfully installed Ionic and Cordova as well with the command "npm install -g ionic cordova"

npm install -g ionic的输出低于

The output from the "npm install -g ionic" is below

C:\ Users \username \ AppData \Roaming\\\
pm\ionic - > C:\Users\username \ AppData \Roaming\\\
pm\\\
ode_modules \ ion\bin \离子
ionic@1.3.20 C:\ Users \username \ AppData \Roaming\\\
pm\\\
ode_modules \ ion $ b $b├──proxy-middleware@0.7.0
├──connect-livereload@0.5.2$ b $b├──progress@1.1.7$ b $b├──open@0.0.5$ b $b├──colors@0.6.2
├──ncp@0.4.2$ b $b├──shroncore@ 1.7.0 $ b $b├──crc@3.2.1$ b $b├──async@0.9.0$ b $b├ ──q@1.0.1$ b $b├──semver@4.3.1$ b $b├──helljs@0.2.6$ b $b├──cross-spawn @ 0 .2.3(lru-cache@2.5.0)$ b $b├──cli-table@0.3.1(colors@1.0.3)$ b $b├──event-stream@3.0.20(stream-combiner) @ 0.0.4,duplexer @ 0.1.1,from @0.1.3,map-stream @ 0.0.5,pause-stream@0.0.11,split
@ 0.2.10,through @2.3.6)$ b $b├──lasthandler@0.2.0(escape-html@1.0.1,debug @ 2.0.0)$ b $b├──form-data@0.1.4(mime@1.2.11,combined-stream @ 0.0.7)$ b $b├──optimist@0.6.0(wordwrap@0.0.2,minimist@0.0.10)$ b $b├──connect@3.1.1(utils-merge@1.0.0 ,parseurl @ 1.3.0,debug @ 1.0.4,finalhandler @ 0.1.0)$ b $b├──opbeat-ionic@1.1.3(json-stringify-safe@5.0.0,console-log-level@ 1.0.0,stackman @ 0.2.2,after-all @ 2.0.1)$ b $b├──npm@2.1.3$ b $b├──mini-lr-fork@0.0.5(debug@0.7 .4,qs @ 0.5.6,faye-websocket @ 0.4.4,noptify @0.0.3)$ b $b├──service-static @ 1.7.1(escape-html@1.0.1,utils-merge @ 1.0.0,parseurl @ 1.3.0,send @ 0.10.1)$ b $b├──xml2js@0.4.4(sax@0.6.1,xmlbuilder@2.6.2)$ b $b├──解压缩@ 0.1.9(setimmediate@1.0.2,readable-stream @ 1.0.33,p ullstream@0.4.1,match-stream @ 0.0.2,binary @ 0.3.0,fstream
@ 0.1.31)$ b $b├──level@0.2.12(revalidator@0.1.8,pkginfo @ 0.3.0,read @ 1.0.0,winston @ 0.6.2,utile @ 0.2.1)$ b $b├──request@2.51.0(json-stringify-safe@5.0.0,caseless@0.8。 0,forever-agent @ 0.5.2,aws-sign2 @ 0.5.5,stringstream @ 0.0.4,
tunnel-agent@0.4.0,oauth-sign@0.5.0,node-uuid@1.4。 3,qs @ 2.3.3,mime-types @ 1.0.2,combined-stream @ 0.0.7,tough-cookie @
0.12.1,bl @ 0.9.4,http-signature@0.10.1, form-data@0.2.0,hawk@1.1.1) $ b $b├──vinyl-fs@0.3.7(graceful-fs@3.0.6,lodash @ 2.4.1,strip-bom@1.0.0 ,vinyl @0.4.6,mkdirp @ 0.5.0,through2 @ 0.6.3,glob-st
ream@3.1.18,glob-watcher@0.0.6)$ b $b├──archiver@ 0.5 .1(lodash@2.4.1,readable-stream @ 1.1.1,lazystream @ 0.1.0,zip-stream @ 0.1.4,file-utils @ 0.1.5)$ b $b└──gulp@ 3.8。 8(pretty-hrtime@0.2.2,interpret @ 0.3.10,deprecated @ 0.0.1,archy @ 0.0.2,minimist @ 1.1.1,semver @ 3.0.1,tild
ify@1.0.0 ,chalk @ 0.5.1,orchestrator @ 0.3.7,gulp-util @ 3.0.4, liftoff@0.12.1)

C:\Users\username\AppData\Roaming\npm\ionic -> C:\Users\username\AppData\Roaming\npm\node_modules\ionic\bin\ionic ionic@1.3.20 C:\Users\username\AppData\Roaming\npm\node_modules\ionic ├── proxy-middleware@0.7.0 ├── connect-livereload@0.5.2 ├── progress@1.1.7 ├── open@0.0.5 ├── colors@0.6.2 ├── ncp@0.4.2 ├── underscore@1.7.0 ├── crc@3.2.1 ├── async@0.9.0 ├── q@1.0.1 ├── semver@4.3.1 ├── shelljs@0.2.6 ├── cross-spawn@0.2.3 (lru-cache@2.5.0) ├── cli-table@0.3.1 (colors@1.0.3) ├── event-stream@3.0.20 (stream-combiner@0.0.4, duplexer@0.1.1, from@0.1.3, map-stream@0.0.5, pause-stream@0.0.11, split @0.2.10, through@2.3.6) ├── finalhandler@0.2.0 (escape-html@1.0.1, debug@2.0.0) ├── form-data@0.1.4 (mime@1.2.11, combined-stream@0.0.7) ├── optimist@0.6.0 (wordwrap@0.0.2, minimist@0.0.10) ├── connect@3.1.1 (utils-merge@1.0.0, parseurl@1.3.0, debug@1.0.4, finalhandler@0.1.0) ├── opbeat-ionic@1.1.3 (json-stringify-safe@5.0.0, console-log-level@1.0.0, stackman@0.2.2, after-all@2.0.1) ├── npm@2.1.3 ├── tiny-lr-fork@0.0.5 (debug@0.7.4, qs@0.5.6, faye-websocket@0.4.4, noptify@0.0.3) ├── serve-static@1.7.1 (escape-html@1.0.1, utils-merge@1.0.0, parseurl@1.3.0, send@0.10.1) ├── xml2js@0.4.4 (sax@0.6.1, xmlbuilder@2.6.2) ├── unzip@0.1.9 (setimmediate@1.0.2, readable-stream@1.0.33, pullstream@0.4.1, match-stream@0.0.2, binary@0.3.0, fstream @0.1.31) ├── prompt@0.2.12 (revalidator@0.1.8, pkginfo@0.3.0, read@1.0.5, winston@0.6.2, utile@0.2.1) ├── request@2.51.0 (json-stringify-safe@5.0.0, caseless@0.8.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, tunnel-agent@0.4.0, oauth-sign@0.5.0, node-uuid@1.4.3, qs@2.3.3, mime-types@1.0.2, combined-stream@0.0.7, tough-cookie@ 0.12.1, bl@0.9.4, http-signature@0.10.1, form-data@0.2.0, hawk@1.1.1) ├── vinyl-fs@0.3.7 (graceful-fs@3.0.6, lodash@2.4.1, strip-bom@1.0.0, vinyl@0.4.6, mkdirp@0.5.0, through2@0.6.3, glob-st ream@3.1.18, glob-watcher@0.0.6) ├── archiver@0.5.1 (lodash@2.4.1, readable-stream@1.1.13, lazystream@0.1.0, zip-stream@0.1.4, file-utils@0.1.5) └── gulp@3.8.8 (pretty-hrtime@0.2.2, interpret@0.3.10, deprecated@0.0.1, archy@0.0.2, minimist@1.1.1, semver@3.0.1, tild ify@1.0.0, chalk@0.5.1, orchestrator@0.3.7, gulp-util@3.0.4, liftoff@0.12.1)

推荐答案

我弄清楚了我的错误。我错过了system32的路径变量。谢谢你的帮助!

I figured out my mistake. I was missing a path variable to system32. Thanks for the help!

这篇关于在PowerShell中发出运行Ionic命令的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆