node.js - polymer : unable initialize project from a template

标签 node.js polymer polymer-1.0

我正在尝试使用我的第一个 Polymer 应用程序进行学习,但我被卡住了。

我从这里开始:https://www.polymer-project.org/1.0/start/toolbox/set-up

我成功安装了 Polymer CLI。 现在,当我尝试从模板初始化项目时,它会在我的 cmd 中显示以下日志:

C:\Users\chint\Desktop\polymer-app>polymer init app-drawer-template
info:    Running template app-drawer-template
info:    Downloading latest release of Polymer/app-drawer-template
info:    Unpacking template files
info:    Finished writing template files

I'm all done. Running bower install for you to install the required dependencies. If this fails, try running the command yourself.


bower                           ENOENT No bower.json present

当我检查时,我的 polymer-app 文件夹是空的。什么都没有下载。

有人可以帮我吗?

PS:我的node.js版本是6.1.0

最佳答案

这似乎是 Windows 上的一个小错误,Ubuntu 对我有用。

This问题表明将 Node.js 更新到 6.2 可以解决该问题。

如果没有:

要启动 app-drawer-template 或商店应用程序,您也可以简单地从 GitHub 克隆它们

git clone https://github.com/Polymer/app-drawer-template.git

git clone https://github.com/Polymer/shop.git

之后在下载的目录中执行 bower install 并使用 polymer serve 运行应用程序

关于node.js - polymer : unable initialize project from a template,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37403735/

相关文章:

dependencies - polymer Dart 的依赖

javascript - polymer 1.0 : Is there any way to use 'layout' as an attribute instead of as a CSS class or using Attribute serialization in the class attribute?

html - 设计可重复使用的 Polymer 元素的策略

node.js - 如何在应用程序路由中使用socket.io

javascript - Polymer Elements ShadowDOM 子节点 - 动态设置样式属性

javascript - lit-html : how to render contents of .innerHtml

polymer - Polymer 1.0 中自动绑定(bind)模板中的计算绑定(bind)

javascript - Node.js应用程序中的reduce函数省略json json数据并且太麻烦

javascript - 为什么 'this' 在使用 Promise 时在类方法内部未定义?

node.js - 处理 Mongoose 验证错误——在哪里以及如何处理?