遵循以下步骤:
安装polymer-cli
运行命令:npm install polymer-cli
安装捆绑的debs:
运行命令:npm install -g bundle-deps
运行命令后:
bundle-deps
最后运行命令:
npm pack
获得了polymer-cli-1.5.7.tgz
文件。
现在,运行npm install命令,
npm install -g polymer-cli-1.5.7.tgz
结果:
获取错误消息:
```
C:\Users\*****\AppData\Roaming\npm
`-- (empty)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\polymer-cli\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"ia32"})
npm WARN sinon-chai@2.14.0 requires a peer of chai@>=1.9.2 <5 but none was installed.
npm WARN sinon-chai@2.14.0 requires a peer of sinon@^1.4.0 || ^2.1.0 || ^3.0.0 || ^4.0.0 but none was installed.
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "polymer-cli-1.5.7.tgz"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! path C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\@polymer\sinonjs-1e1235f0
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\@polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\@polymer\sinonjs'
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\*****\AppData\Roaming\npm\node_modules\.staging\@polymer\sinonjs-1e1235f0' -> 'C:\Users\*****\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\@polymer\sinonjs'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! C:\nginx-1.13.7\html\polymer-cli\npm-debug.log
npm ERR! code 1
```
注意: ****** - 用户名
- Polymer CLI: 1.5.7
- node: v.6.11.5
- Operating System: windows
答案 0 :(得分:0)
我不确定为什么在第一步安装了聚合物-cli时安装了聚合物-cli-1.5.7.tgz?但不是全局性的,你在第一步中缺少-g开关。你想要实现什么,你遵循哪个程序?该问题可能与权限有关,因为您无权访问该路径,但您可以尝试使用管理员权限运行控制台。最好解释一下你想要设置什么,这样我们可以给你一个更好的答案:)