slider icon indicating copy to clipboard operation
slider copied to clipboard

WARN @vueform/slider doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module

Open andysay opened this issue 2 years ago • 4 comments

WARN @vueform/slider doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix. 11:55:29

andysay avatar Dec 17 '21 08:12 andysay

Happened to me today as well after updating Vite and other dependencies.

markusand avatar Dec 21 '21 12:12 markusand

I am also seeing this in a Nuxt 3 project.

olivervorasai avatar Dec 22 '21 20:12 olivervorasai

Looks like the issue is that there is no default export in the declaration file.

In src/index.d.ts, try the following code:

import * as Slider from './Slider';
export default Slider;

mchestnut avatar Jan 07 '22 17:01 mchestnut

Same issue on a Nuxt 3 project. @mchestnut fix works for me @adamberecz

lacorde avatar Jan 10 '22 10:01 lacorde