聚合物生成错误 [英] Error with polymer build

查看:108
本文介绍了聚合物生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力学习如何使用新的应用程序工具箱.在本地,效果很好;但是当我使用时:

I am triying to learn how to use the new app-toolbox. In local, works fine; but when I use:

polymer build

我得到这些错误:

C:\ Users \ Marcos \ Documents \ poly2>聚合物生成 信息:正在构建应用程序... 信息:正在生成构建/未捆绑... 信息:正在生成构建/捆绑... 错误:未捕获的异常:错误:文件路径不在根目录中:C:/Users/Marcos/Documents/poly2/index.html(C:\ Users \ Marcos \ Documents \ poly2) 错误:错误:文件路径不在根目录中:C:/Users/Marcos/Documents/poly2/index.html(C:\ Users \ Marcos \ Documents \ poly2) 在StreamAnalyzer.urlFromPath(C:\ Users \ Marcos \ AppData \ Roaming \ npm \ node_modules \ polymer-cli \ lib \ build \ analyzer.js:91:19) 在StreamAnalyzer.addFile(C:\ Users \ Marcos \ AppData \ Roaming \ npm \ node_modules \ polymer-cli \ lib \ build \ analyzer.js:81:29) 在StreamAnalyzer._transform(C:\ Users \ Marcos \ AppData \ Roaming \ npm \ node_modules \ polymer-cli \ lib \ build \ analyzer.js:48:14) 在StreamAnalyzer.Transform._read(_stream_transform.js:167:10) 在StreamAnalyzer.Transform._write(_stream_transform.js:155:12) 在doWrite(_stream_writable.js:301:12) 在writeOrBuffer(_stream_writable.js:287:5) 在StreamAnalyzer.Writable.write(_stream_writable.js:215:11) 在PassThrough.ondata(C:\ Users \ Marcos \ AppData \ Roaming \ npm \ node_modules \ polymer-cli \ node_modules \ ready-stream \ lib_stream_visible.js:531:20) 在emitOne(events.js:95:20)

C:\Users\Marcos\Documents\poly2>polymer build info: Building application... info: Generating build/unbundled... info: Generating build/bundled... error: Uncaught exception: Error: file path is not in root: C:/Users/Marcos/Documents/poly2/index.html (C:\Users\Marcos\Documents\poly2) error: Error: file path is not in root: C:/Users/Marcos/Documents/poly2/index.html (C:\Users\Marcos\Documents\poly2) at StreamAnalyzer.urlFromPath (C:\Users\Marcos\AppData\Roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:91:19) at StreamAnalyzer.addFile (C:\Users\Marcos\AppData\Roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:81:29) at StreamAnalyzer._transform (C:\Users\Marcos\AppData\Roaming\npm\node_modules\polymer-cli\lib\build\analyzer.js:48:14) at StreamAnalyzer.Transform._read (_stream_transform.js:167:10) at StreamAnalyzer.Transform._write (_stream_transform.js:155:12) at doWrite (_stream_writable.js:301:12) at writeOrBuffer (_stream_writable.js:287:5) at StreamAnalyzer.Writable.write (_stream_writable.js:215:11) at PassThrough.ondata (C:\Users\Marcos\AppData\Roaming\npm\node_modules\polymer-cli\node_modules\readable-stream\lib_stream_readable.js:531:20) at emitOne (events.js:95:20)

我正在使用Windows 10.

I am using Windows 10.

推荐答案

我遇到了同样的问题.删除C:\Users\%USER_NAME%\AppData\Roaming\npm-cache处的npm-cache并重新安装nodejs和polymer-cli为我解决了此问题. 当前,我正在将Windows 10与nodejs v4.4.5,npm v2.15.5和polymer-cli v0.11.0一起使用(我注意到他们刚刚将Polymer-cli从v0.10.0更新为了v0.11.0)

I got the same problem. Deleting npm-cache at C:\Users\%USER_NAME%\AppData\Roaming\npm-cache and re-installing nodejs and polymer-cli fixed this for me. Currently, I'm using Windows 10 with nodejs v4.4.5, npm v2.15.5 and polymer-cli v0.11.0 (I notice that they've just updated polymer-cli from v0.10.0 to v0.11.0)

希望获得帮助.

这篇关于聚合物生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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