我正在遵循聚合物教程中的说明:
https://www.polymer-project.org/3.0/start/install-3-0
(我跳过了可选部分)
但是,在我执行了命令"polymer init“,然后选择了一个特定的模板之后,它什么也做不了。
C:\Development>git --version
git version 2.17.1.windows.2
C:\Development>npm --version
6.1.0
C:\Development>node --version
v10.4.0
C:\Development>npm install -g polymer-cli
C:\Users\nhoyti\AppData\Roaming\npm\polymer -> C:\Users\nhoyti\AppData\Roaming\npm\node_modules\polymer-cli\bin\polymer.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\polymer-cli\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ polymer-cli@1.7.3
updated 1 package in 8.945s
C:\Development>polymer --version
1.7.3
C:\Development>mkdir my-app
C:\Development>cd my-app
C:\Development\my-app>polymer init
'uname' is not recognized as an internal or external command,
operable program or batch file.
? Which starter template would you like to use? polymer-3-starter-kit
info: [init] Running template polymer-3-starter-kit...这会有什么问题呢?我试着检查我创建的文件夹,但仍然是空的。
小贴士和线索非常受欢迎。
谢谢!
发布于 2018-11-06 18:14:44
我遇到了类似的问题,在选择之后,polymer init变得没有反应。但是,我没有收到那条'uname' is not recognized...消息。
我尝试使用以下命令polymer init [selection]。这对我很有效。我想要一个polymer-3-application,所以我使用了polymer init polymer-3-application。
在this Github comment中找到了这些信息。
这看起来和@mindon的建议很相似。
发布于 2019-08-08 01:02:09
它在bash中起作用。
Go to the folder where you want polymer to be initialized.
On the address bar, clear everything and type bash.
It will open up bash prompt.
And then, as usual, type polymer init.发布于 2018-06-15 05:53:52
'uname' is not recognized as an internal or external command,
operable program or batch file.^在我看来,shell命令有问题。
尝试使用bash,下面是在Windows 10中获取bash的方法:
https://www.polymer-project.org/3.0/docs/tools/polymer-cli#windows-10
https://stackoverflow.com/questions/50848598
复制相似问题