Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
andysay opened this issue Dec 17, 2021 · 4 comments · Fixed by #42

Comments

@andysay
Copy link

andysay commented Dec 17, 2021

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

@markusand
Copy link

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

@olivervorasai
Copy link

I am also seeing this in a Nuxt 3 project.

@mchestnut
Copy link
Contributor

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;

@lacorde
Copy link

lacorde commented Jan 10, 2022

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

mchestnut added a commit to mchestnut/slider that referenced this issue Jan 10, 2022
adamberecz added a commit that referenced this issue Dec 20, 2022
fix: add default export to declaration index #41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants