-
-
Notifications
You must be signed in to change notification settings - Fork 423
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
v 0.2.26 : 'TinyEmitter' exporting problem with create-react-app #76
Comments
This seems to be a common issue from You can look for solution on those threads, one from Framer suggests to use |
Hello, I've had similar issue in Vue/Nuxt - solved thanks to this solution: vuejs/pinia#675 (comment) Maybe it can help your case too. |
@abirtasrif any news, is it fixed ? |
@clementroche No, but I've used the previous version of lenis which working fine. |
@abirtasrif Can you try again with v1.0.0-dev.5 ? |
@clementroche lenis 0.2.28 is working fine. |
Description
Though its working perfectly with version 0.2.21 . My dev-server returning below error with version 0.2.26 -
./node_modules/@studio-freight/lenis/dist/lenis.mjs
Can't import the named export 'TinyEmitter' from non EcmaScript module (only default export is available)
Below is the hook code that used-
import { useEffect } from "react";
import Lenis from "@studio-freight/lenis";
export const useSmoothScroll = () =>
const lenis = new Lenis({
duration: 1.5,
easing: (t) => Math.min(1, 1.001 - Math.pow(2, -10 * t)),
direction: "vertical",
smooth: true,
});
useEffect(() => {
function raf(time) {
lenis.raf(time);
requestAnimationFrame(raf);
}
requestAnimationFrame(raf);
}, []);
};
The text was updated successfully, but these errors were encountered: