为什么 "polymer build" 会抛出错误 "File not found with singular glob"?
Why does "polymer build" throw the error "File not found with singular glob"?
在我项目的根目录中使用 Polymer CLI 1.1.0 运行 polymer build
后,我得到这个错误:
info: Clearing build/ directory...
error: Uncaught exception: Error: File not found with singular glob: /home/willie/Projects/World History Final Project/src/passport-app/passport-app.html
error: Error: File not found with singular glob: /home/willie/Projects/World History Final Project/src/passport-app/passport-app.html
at Glob.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/index.js:41:11)
at Glob.g (events.js:292:16)
at emitOne (events.js:96:13)
at Glob.emit (events.js:188:7)
at Glob._finish (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:172:8)
at done (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:159:12)
at Glob._processSimple2 (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:652:12)
at /usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:640:10
at Glob._stat2 (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:736:12)
at lstatcb_ (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:728:12)
我想知道为什么总是这样。
Polymer CLI 旨在使用 REPL app shell architecture. In your polymer.json
文件构建应用程序,您必须定义任何延迟加载的 "fragments"。将片段添加到文件后,运行 polymer build
在包含配置文件的目录中。
{
"entrypoint": "index.html",
"shell": "src/passport-app.html",
"fragments": [
//This is where you messed up.
"src/passport-home.html",
"src/passport-introduction.html",
"src/passport-404.html",
"src/passport-economy.html",
"src/passport-news.html",
"src/passport-immigration.html",
"src/passport-culture.html"
],
"sources": [
"src/**/*",
"images/**/*",
"bower.json"
],
"extraDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/*.js"
],
"lint": {
"rules": [
"polymer-2"
]
},
"builds": [
{
"preset": "es6-bundled"
}
]
}
在我项目的根目录中使用 Polymer CLI 1.1.0 运行 polymer build
后,我得到这个错误:
info: Clearing build/ directory...
error: Uncaught exception: Error: File not found with singular glob: /home/willie/Projects/World History Final Project/src/passport-app/passport-app.html
error: Error: File not found with singular glob: /home/willie/Projects/World History Final Project/src/passport-app/passport-app.html
at Glob.<anonymous> (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/index.js:41:11)
at Glob.g (events.js:292:16)
at emitOne (events.js:96:13)
at Glob.emit (events.js:188:7)
at Glob._finish (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:172:8)
at done (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:159:12)
at Glob._processSimple2 (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:652:12)
at /usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:640:10
at Glob._stat2 (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:736:12)
at lstatcb_ (/usr/lib/node_modules/polymer-cli/node_modules/glob-stream/node_modules/glob/glob.js:728:12)
我想知道为什么总是这样。
Polymer CLI 旨在使用 REPL app shell architecture. In your polymer.json
文件构建应用程序,您必须定义任何延迟加载的 "fragments"。将片段添加到文件后,运行 polymer build
在包含配置文件的目录中。
{
"entrypoint": "index.html",
"shell": "src/passport-app.html",
"fragments": [
//This is where you messed up.
"src/passport-home.html",
"src/passport-introduction.html",
"src/passport-404.html",
"src/passport-economy.html",
"src/passport-news.html",
"src/passport-immigration.html",
"src/passport-culture.html"
],
"sources": [
"src/**/*",
"images/**/*",
"bower.json"
],
"extraDependencies": [
"manifest.json",
"bower_components/webcomponentsjs/*.js"
],
"lint": {
"rules": [
"polymer-2"
]
},
"builds": [
{
"preset": "es6-bundled"
}
]
}