2017-05-01 65 views
0

我試圖建立一個聚合物空白應用W這些指令 https://www.polymer-project.org/2.0/start/install-2-0聚合物構建返回該錯誤

  1. 我使用節點,NPM的最新版本和聚合物
  2. 我創建了一個測試項目(redcloud ),並使用聚合物初始化W¯¯應用模板
  3. 聚合物服務器顯示空白屏幕
  4. 運行polymer buildjs compile選項都返回下面的錯誤...
sudo polymer build --js-compile 

info: Clearing build/ directory...

info: (default) Building...

error: Uncaught exception: Error: ENOENT: no such file or directory,

open '/Users/greg/redcloud/bower_components/webcomponentsjs/webcomponents-loader.js'

error: Error: ENOENT: no such file or directory, open '/Users/greg/redcloud/bower_components/webcomponentsjs/webcomponents-loader.js'

回答

0

試圖構建應用程序之前運行bower install。 (它似乎有一些失蹤的鮑爾依賴。)

+0

謝謝你@尼古拉斯。 module.js:472 throw err; ^ 錯誤:無法找到模塊 '內部/ FS' 在Function.Module._resolveFilename (module.js:470:15) 在Function.Module._load(module.js:418:25) 在Module.require (module.js:498:17) at evalmachine的require(internal/module.js:20:19) 。 :18:20 at Object。 (/usr/local/lib/node_modules/bower/node_modules/graceful-fs/fs.js:11:1) at Module._compile(module.js:571:32) at Object.Module._extensions .. js(module.js:580:10) at Module.load(module.js:488:32) at tryModuleLoad(module。 – RedCloud

+0

hmm可能從頭開始重新啓動 - 應該可以正常工作,也不要使用「sudo」來運行您的命令一般 - – Nicolas

+0

是的我從頭開始重新啓動並且包含最新的RC,看起來聚合物init會拉動需要的任何東西,我注意到默認的PRPL應用程序模板是Service Worker沒有運行。用於開發,將在構建時生成。「 – RedCloud