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

Needs ESM export #503

Open
benwoodward opened this issue May 24, 2021 · 0 comments
Open

Needs ESM export #503

benwoodward opened this issue May 24, 2021 · 0 comments

Comments

@benwoodward
Copy link

Trying to use this with https://github.com/wareset/svelte-use-mousetrap + https://github.com/sveltejs/kit and not able to get it work due to the lack of ESM export in the package.

> Cannot use import statement outside a module
/Users/ben/dev/my-project/node_modules/svelte-use-mousetrap/index.js:1
import Mousetrap from 'mousetrap';
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at wrapSafe (internal/modules/cjs/loader.js:979:16)
    at Module._compile (internal/modules/cjs/loader.js:1027:27)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
    at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
    at async Loader.import (internal/modules/esm/loader.js:166:24)
    at async prerender (file:///Users/ben/dev/my-project/node_modules/@sveltejs/kit/dist/chunks/index5.js:79:14)
    at async Object.prerender (file:///Users/ben/dev/my-project/node_modules/@sveltejs/kit/dist/chunks/index5.js:296:5)
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

1 participant