0

I am using @polymer/lit-element for my application.Recently I did npm install which led to following error

"npm WARN deprecated @polymer/lit-element@0.5.2: @polymer/lit-element has moved to lit-element. Please uninstall this package and install lit-element. See https://www.polymer-project.org/blog/2019-01-11-lit-element-rc".

When I checked my node_modules, the lit-element folder had been deleted from @polymer folder.Is there any way that I can get back my @polymer/lit-element? ( Apart from the point that I have to migrate whole my application to lit-element which sounds tedious )

Shahbaz A.
  • 4,047
  • 4
  • 34
  • 55
Namani Supriya
  • 41
  • 1
  • 14
  • use `npm install --save lit-element` at the root of your project. You will have the two directory under node_module like `lit-html` and `lit-element` then just change the path something like `import { LitElement, html } from '..\node_modules\lit-element\lit-element.js'` – Cappittall Feb 12 '19 at 07:58

1 Answers1

6

npm WARN deprecated @polymer/lit-element@0.5.2 is a warning not an error. v0.5.2 is still available for use. You can npm install to install the dependencies listed in your package.json or if @polymer/lit-element is not listed in in package.json you can add it with npm install --save @polymer/lit-element@0.5.1.

That being said @polymer/lit-element is deprecated and being replaced with lit-element. You should replace @polymer/lit-element with lit-element within package.json and your codebase.

abraham
  • 46,583
  • 10
  • 100
  • 152
  • Small update to this answer as of 2022. `lit-element` is now contained in the lit package: https://www.npmjs.com/package/lit It can be imported with `import { html, LitElement } from 'lit';` – YouCodeThings Oct 18 '22 at 19:45