Tools: [polyserve] 0.27.4 regression: duplicate CE registration failures

Created on 12 Apr 2018  路  4Comments  路  Source: Polymer/tools

Description

After upgrading to latest polyserve 0.27.4 released today, we get the errors in tests:

Error: Failed to execute 'define' on 'CustomElementRegistry': this name has already been used with this registry
  <unknown> at /node_modules/@polymer/polymer/lib/elements/dom-module.js:134

Versions & Environment

  • polyserve: 0.27.4
  • node: 8.11.1
  • Operating System: Mac OS

Steps to Reproduce

  1. Clone the repo:
git clone --depth 1 -b p3-preview-bare git://github.com/vaadin/vaadin-themable-mixin.git && cd vaadin-themable-mixin
  1. Install the modulizer:
git clone git://github.com/Polymer/polymer-modulizer.git && cd polymer-modulizer && npm link
  1. Install the tools:
npm i -g bower yarn magi-cli polyserve
  1. Install bower deoendencies:
bower install
  1. Run the conversion:
magi p3-convert --out . --import-style=name
  1. Install dependencies:
yarn installl --flat
  1. Serve the component:
polyserve --npm --module-resolution=node
  1. Go to http://127.0.0.1:8081/components/@vaadin/vaadin-themable-mixin/test/

Expected Results (0.26.0)

Tests are passing, no errors thrown:
screen shot 2018-04-12 at 9 25 33

Actual Results (0.27.4)

The following errors are thrown:

screen shot 2018-04-12 at 9 17 17

Note also a different number of requests:

  • with the URL: http://127.0.0.1:8081/components/@polymer/polymer/lib/elements/dom-module.js
  • with the URL: http://127.0.0.1:8081/node_modules/@polymer/polymer/lib/elements/dom-module.js

If we don't use --import-style=name, we get the 404 instead for two of those (not having components in the URL):

screen shot 2018-04-12 at 9 31 47

All 4 comments

A gentle ping on this to @aomarks.
We're aiming to get versions of the components using bare module specifiers published and tested with the latest CLI, and we are currently stuck to 1.7.0-pre.3 because of this issue.

Acknowledged. Will be fixed this week.

Just released [email protected] which contains this fix (hopefully).

Yay! Tried with some of the components and so far it works like a charm. Thank you for quick fix! 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

idoshamun picture idoshamun  路  3Comments

NeoLegends picture NeoLegends  路  3Comments

justinfagnani picture justinfagnani  路  4Comments

ronnyroeller picture ronnyroeller  路  4Comments

emilbillberg picture emilbillberg  路  3Comments