Giter Club home page Giter Club logo

Comments (12)

kirilledelman avatar kirilledelman commented on July 18, 2024 20

This is really annoying, considering as a new user I followed the guide exactly (https://www.polymer-project.org/3.0/start/toolbox/add-elements) and end up with cryptic errors like these.

from paper-button.

creativeautomaton avatar creativeautomaton commented on July 18, 2024 3

A quick fix for this is just to delete the node_modules folder inside the @polymer/paper-button folder

from paper-button.

keanulee avatar keanulee commented on July 18, 2024 2

This is a symptom of duplicate dependencies installed. Do you see multiple requests of polymer-legacy.js or paper-button.js (from different nested node_modules/) in the network timeline? Are there multiple versions of polymer in your package-lock.json?

This is definitely a footgun with using NPM and custom elements. We try to include working package-lock.json in our projects (polymer-starter-kit, pwa-starter-kit, etc.), but you definitely need to be careful with this when updating dependencies.

from paper-button.

colincannon-acp avatar colincannon-acp commented on July 18, 2024

I am having the same problem with paper-input and paper-button, and those are the only elements I tested with the new starter kit. I gave up trying after that. My starter kit was bare bones, to replicate simply init the start kit 3.0 and import paper-button (or paper-input).

from paper-button.

keanulee avatar keanulee commented on July 18, 2024

If you're are adding new element dependencies (like paper-button) to polymer-starter-kit, be sure you don't end up installing multiple, nested copies of polymer. The best way to do this is to start with fresh set of dependences (rm -rf node_modules/ package-lock.json; npm i) and then reviewing network timeline and package-lock (as I mentioned in my last comment).

from paper-button.

herberthobregon avatar herberthobregon commented on July 18, 2024

@keanulee Thank you very much! I was already frustrating with this error!

from paper-button.

keanulee avatar keanulee commented on July 18, 2024

I added some comments about package-lock.json at Polymer/polymer-starter-kit#1123 (comment). Closing since no action is needed in this repository.

from paper-button.

keanulee avatar keanulee commented on July 18, 2024

@katejeffreys @arthurevans Can we update the docs site with this info?

from paper-button.

gilbertoRosalesVaquin avatar gilbertoRosalesVaquin commented on July 18, 2024

I have the same problem

from paper-button.

sushantbs avatar sushantbs commented on July 18, 2024

Is there a proposed solution for managing versions more elegantly? I understand that this is sort of an issue of using npm in conjunction with custom elements but I foresee this is as a significant deterrent, especially as the size of the application grows and updating packages in way that their dependencies are always in sync becomes difficult. Have you tried / would you recommend using webpack and use the resolve: { alias: {...} } option to avoid running into the aforementioned issue?

from paper-button.

jcanales avatar jcanales commented on July 18, 2024

This worked for me, thank you guys

from paper-button.

flatmax avatar flatmax commented on July 18, 2024

We have a method for resolving these issues, it is to do with removing nested @Polymer modules. Check it out here :
Polymer/polymer#5407

from paper-button.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.