tools: Error "Promise rejection: Error: no resolver found for ../polymer/polymer.html" for "polymer build" with 0.12.0

Description

Build fails for release 0.12.0 with the following errors:

error:   Promise rejection: Error: no resolver found for ../polymer/polymer.html
error:   Error: no resolver found for ../polymer/polymer.html
at FileLoader.request (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/loader/file-loader.js:70:37)
at Analyzer.load (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:121:32)
at Analyzer._getDependencies (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:433:25)
at Analyzer._dependenciesLoadedFor (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:401:25)
at Analyzer._parseHTML (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:227:50)
at null._onTimeout (/usr/local/lib/node_modules/polymer-cli/node_modules/hydrolysis/lib/analyzer.js:125:39)
at Timer.listOnTimeout (timers.js:92:15)

(the errors repeat 3 times)

I also tried changing the <link..> path to ../bower_components/polymer/polymer.html and it still fails; the errors contain the updated path.

Versions & Environment

  • Polymer CLI: 0.12.0
  • node: 4.4.1
  • Operating System: OS X El Capitan

Steps to Reproduce

  • mkdir polymer-test
  • cd polymer-test/
  • polymer init (accept defaults)
  • polymer build

Expected Results

Build should not fail for out-of-the box projects.

Actual Results

Build fails with default project.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 18 (10 by maintainers)

Most upvoted comments

@quangv not sure where it’s failing, but I was able to get it working for you. Here are the relevent lines from your output:

debug:   sourceGlobs: 
        /home/quang/todo-polymer/index.html
        /home/quang/todo-polymer/src/**/*
        /home/quang/todo-polymer/bower.json
debug:   root: /home/quang/todo-polymer
debug:   shell: undefined
debug:   entrypoint: /home/quang/todo-polymer/index.html
debug:   fragments: /home/quang/todo-polymer/index.html
debug:   sources: /home/quang/todo-polymer/src/**/*,/home/quang/todo-polymer/bower.json
debug:   includeDependencies: 

An undefined shell is okay, but fragments shouldn’t be your index.html. If you run this, it successfully builds:

polymer build --verbose --fragment src/todo-polymer-app/todo-polymer-app.html 

Looks like we might have a problem with our defaults. As a work around for now, I’d suggest running with the --fragment flag or adding a polymer.json file to your project. See: https://www.polymer-project.org/1.0/docs/tools/polymer-cli#build-config

@JeanRemiDelteil check out https://github.com/Polymer/polymer-build/pull/19, we’re writing a new readme as we speak 😃

@quangv interesting, I can reproduce that same output when run in your project. It looks like it’s just failing silently which is no good. Digging into it now… @jfletcher-nuxeo @adefran83 usually a “no such file or directory” error appears when a bad path in your project is encountered. Check your project for where that path may have come and make sure it’s pointing where you need it to.