Tools: 6.0.0 - Bower install error not honoring .bowerrc

Created on 7 Feb 2017  路  11Comments  路  Source: Polymer/tools

We are unable to run web-component-tester without creating a symlink from our custom bower directory to bower_components. The directory name is in our .bowerrc file, so it should be possible for wct to check the right directory.

Our .bowerrc file:
{ "directory": "components/" }

Error message we get:

Error:
The web-component-tester Bower package is not installed as a dependency of this project (search-artifact-components).

Please run this command to install:
bower install --save-dev web-component-tester

Web Component Tester >=6.0 requires that support files needed in the browser are installed as part of the project's dependencies or dev-dependencies. This is to give projects greater control over the versions that are served, while also making Web Component Tester's behavior easier to understand.

Expected to find a package.json or bower.json or .bower.json at: /Users/marybeshaw/fs/search-artifact-components/bower_components/web-component-tester/

Code in wct where bower_components is hard-coded:
https://github.com/Polymer/web-component-tester/blob/master/runner/webserver.ts#L71

web-component-tester Medium Available Bug

Most helpful comment

Any update on this? Really frustrating issue.

All 11 comments

@rictic we should be using the Bower library to find the components dir.

Any update on this? Really frustrating issue.

Using a symlink for now, but yeah, this is pretty frustrating.

This issue was moved to Polymer/polyserve#196

Erp, nm, this is a wct issue not a polyserve issue. My bad, reopening.

I would like to take a stab at a PR for this fix.

It seems we would want to update this:
https://github.com/Polymer/web-component-tester/blob/master/runner/webserver.ts#L71

And then for variants we would want to fix this:
https://github.com/Polymer/polyserve/blob/master/src/start_server.ts#L217

It appears we would want to use this:
https://www.npmjs.com/package/bower-config

And then have a test similar to this one:
https://github.com/Polymer/web-component-tester/tree/master/test/fixtures/integration/multiple-component_dirs

Does that seem like a reasonable approach, or are there further considerations?

/sub

Any chance for this to get fixed before 7.0 lands? This could be essential for 1.x projects, e. g. we are still using 4.3.1 without being able to have Mocha upgrade.

A gentle ping to @usergenic

BTW, I was wondering if 6.x would still work for Polymer 1.x projects. Which wct major release is expected to drop 1.x support?

@justinfagnani another ping to you.

I totally understand the importance of the npm-related stuff, but this issue is a blocker for us to upgrade from 4.3.1 to 6.x (and even to 5.0 which incorporated mocha upgrade).

Could you please, or someone from the Tools team, review #578 and corresponding PR for polyserve? Having that landed before 7.0 would be a huge benefit for maintenance 1.x projects.

@web-padawan reviewing now

Was this page helpful?
0 / 5 - 0 ratings