【发布时间】:2018-09-04 23:55:12
【问题描述】:
我正在 Windows 7 x64 中设置我们的 SharePoint 框架开发环境,如本视频所述:
https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-environment
我成功安装了Node.js + VS Code,现在我正处于安装yo包的阶段,使用这个命令:
npm install -g yo gulp
但我收到错误"Your yo version is outdated",如下图:
V Global configuration file is valid
V NODE_PATH matches the npm root
V Node.js version
V No .bowerrc file in home directory
V No .yo-rc.json file in home directory
× yo version
Your yo version is outdated.
Upgrade to the latest version by running:
npm install -g yo@latest
V npm version
Found potential issues on your machine :(
+ gulp@3.9.1
+ yo@2.0.5
added 787 packages in 229.024s
所以我运行这个命令来升级yo:
npm install -g yo@latest
但我得到了同样的错误:
Running sanity checks on your system
V Global configuration file is valid
V NODE_PATH matches the npm root
V Node.js version
V No .bowerrc file in home directory
V No .yo-rc.json file in home directory
× yo version
Your yo version is outdated.
Upgrade to the latest version by running:
npm install -g yo@latest
V npm version
Found potential issues on your machine :(
+ yo@2.0.5
updated 1 package in 38.439s
我也尝试运行这些命令:
npm rm -g yo
npm install -g yo
但他们没有解决任何问题。
而当我想打开yo,如下,又报错:
PS C:\Users\*****> yo @microsoft/sharepoint
yo : The term 'yo' 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
+ yo @microsoft/sharepoint
+ ~~
+ CategoryInfo : ObjectNotFound: (yo:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
谁能给点建议?
【问题讨论】:
标签: node.js powershell sharepoint yo spfx