Error with polymer build

喜夏-厌秋 提交于 2019-12-12 06:35:49

问题


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

polymer build

I get these errors:

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)

I am using Windows 10.


回答1:


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)

Hope this help.



来源:https://stackoverflow.com/questions/37500431/error-with-polymer-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!