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

Missing ESM module index.mjs #25

Closed
cbenz opened this issue Sep 30, 2021 · 1 comment
Closed

Missing ESM module index.mjs #25

cbenz opened this issue Sep 30, 2021 · 1 comment

Comments

@cbenz
Copy link

cbenz commented Sep 30, 2021

The package.json file mentions "module": "dist/index.mjs", but that file is not present in the svelte-actions package after installing it from npm, in node_modules/svelte-actions. I only find index.d.ts and index.js in the dist directory.

As a result, I get that error when doing import { clickOutside } from "svelte-actions": Error: Failed to resolve entry for package "svelte-actions". The package may have incorrect main/module/exports specified in its package.json: Failed to resolve entry for package "svelte-actions". The package may have incorrect main/module/exports specified in its package.json. when using SvelteKit, which uses Vite under the hood, which is ESM first.

swyxio added a commit that referenced this issue Feb 5, 2022
@swyxio
Copy link
Owner

swyxio commented Feb 5, 2022

sorry for the delay, i'm pretty new to esm build chains. can you check v0.2.1 now? reopen if necessary and help me out if you can

@swyxio swyxio closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants