Polymer / tools

Polymer Tools Monorepo
BSD 3-Clause "New" or "Revised" License
430 stars 200 forks source link

polymer-cli - breaks on install due to obsolete dependencies #374

Closed kristianmandrup closed 5 years ago

kristianmandrup commented 6 years ago

Was trying to install via pwa-starter-kit

Issues posted on pwa-start-kit: https://github.com/Polymer/pwa-starter-kit/issues/100 https://github.com/Polymer/pwa-starter-kit/issues/99

Looking into packages.json of polymer-cli, I can see it still has multiple bower dependencies. I thought the whole deal of polymer 3.0 was to get away from bower??

    "bower": "1.8.2",
    "bower-json": "^0.8.1",
    "bower-logger": "^0.2.2",

There seems to still be dependencies to web-components ^1.0.7 which conflicts

yarn install in pwa-starter-kit, trips on polymer-cli:

Resolving packages...
warning polymer-cli > bower@1.8.2: ...psst! Your project can stop working at any moment because its dependencies can change. Prevent this by migrating to Yarn: https://bower.io/blog/2017/how-to-migrate-away-from-bower/
warning polymer-cli > github@7.3.2: 'github' has been renamed to '@octokit/rest' (https://git.io/vNB11)
warning polymer-cli > web-component-tester > nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
warning polymer-cli > web-component-tester > sinon > formatio@1.2.0: This package is unmaintained. Use @sinonjs/formatio instead
warning replace > nomnom@1.6.2: Package no longer supported. Contact support@npmjs.com for more info.
warning replace > minimatch@0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
warning wct-browser-legacy > sinon > formatio@1.1.1: This package is unmaintained. Use @sinonjs/formatio instead
info Unable to find a suitable version for "@webcomponents/webcomponentsjs", please choose one by typing one of the numbers below:
  1) "@webcomponents/webcomponentsjs@^2.0.0" which resolved to "2.0.0"
  2) "@webcomponents/webcomponentsjs@^1.0.7, @webcomponents/webcomponentsjs@^1.0.7" which resolved to "1.2.0"
Answer?: 

What to do? Looks like this is not ready yet, loads of dependencies need to be updated and resolved!? Please advice or fix ASAP. Thanks.

nicktheo59 commented 6 years ago

I'm a n00b (so sorry if this is relevant) but did get it to run after running:

npm i npm @latest -g npm i npm

although stuck on 'npm audit' -> (55 vulnerabilities) and npm 'run test' -> Selenium won't run even though I've just updated Java

mercmobily commented 6 years ago

https://github.com/Polymer/pwa-starter-kit/issues/99 depends on this one... any news?

keanulee commented 5 years ago

yarn on pwa-starter-kit won't work because polymer-cli includes @webcomponents/webcomponentsjs@^1.0.7 through web-component-tester (for backwards compatibility reasons), which causes the conflicting versions you see. We suggest using npm in pwa-starter-kit (and included package-lock.json). If you must use yarn, you can consider installing polymer-cli globally (so the npm scripts still work), remove polymer-cli from devDependencies in package.json, and replace package-lock.json with yarn.lock.

Closing since yarn support without breaking changes isn't feasible.

mercmobily commented 5 years ago

Hi,

Keanu, can I humble ask... how come npm works, whereas yarn doesn't? The answer is probably obvious -- apologies.

On Tue, 18 Dec 2018 at 08:27, Keanu Lee notifications@github.com wrote:

Closed #374 https://github.com/Polymer/tools/issues/374.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Polymer/tools/issues/374#event-2031730115, or mute the thread https://github.com/notifications/unsubscribe-auth/ACB7XoHA0vdA0dds5OVgaHXIQOpIUmNZks5u6DZygaJpZM4T83gx .

--

keanulee commented 5 years ago

yarn used to require flat installation, which required that there be only one of each dependency. polymer-cli requires @webcomponents/webcomponentsjs@^1.0.7 through web-component-tester, and this conflicts with pwa-starter-kit requiring @webcomponents/webcomponentsjs@^2.0.0, so flat installation isn't possible.

It's been a while since this issue was created, and now yarn does not require flat installation by default. Instead, in my previous comment I was really trying to say that yarn install --flat won't work because of conflicting versions. (yarn by itself should work and respect package-lock.json.) Hope that makes more sense.

mercmobily commented 5 years ago

thank you and sorry for the bother! Yep, the --flat bit (or lack thereof) confused me :D

On Tue, 18 Dec 2018 at 09:11, Keanu Lee notifications@github.com wrote:

yarn used to require flat installation, which required that there be only one of each dependency. polymer-cli requires @webcomponents/webcomponentsjs@^1.0.7 through web-component-tester, and this conflicts with pwa-starter-kit requiring @webcomponents/webcomponentsjs@^2.0.0, so flat installation isn't possible.

It's been a while since this issue was created, and now yarn does not require flat installation by default. Instead, in my previous comment I was really trying to say that yarn install --flat https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-flat won't work because of conflicting versions. (yarn by itself should work and respect package-lock.json.) Hope that makes more sense.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Polymer/tools/issues/374#issuecomment-448058923, or mute the thread https://github.com/notifications/unsubscribe-auth/ACB7Xq4A-JQaggY3m_QujArP0d8Pb63wks5u6EC4gaJpZM4T83gx .

--