project_3D_developer_portfolio icon indicating copy to clipboard operation
project_3D_developer_portfolio copied to clipboard

React tilt issue

Open yeshwantthota opened this issue 1 year ago • 18 comments

Screen becomes blank when react tilt is used in About.js page

yeshwantthota avatar Apr 02 '23 05:04 yeshwantthota

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/react-tilt.js?v=2372342d' does not provide an export named 'default' (at About.jsx:11:8) this issue can be resolved by {} import { tilt } from 'tilt'; // ^^^ name of export

Smr777 avatar Apr 02 '23 09:04 Smr777

import { tilt } from 'tilt'; not working @Smr777

niladrix719 avatar Apr 02 '23 11:04 niladrix719

@niladrix719 close and restart the server, it works for me

yeshwantthota avatar Apr 02 '23 11:04 yeshwantthota

this is what i am getting after restart @yeshwantthota

Screenshot from 2023-04-02 17-25-07 image

niladrix719 avatar Apr 02 '23 11:04 niladrix719

import { Tilt } from "react-tilt"; it should be like this

yeshwantthota avatar Apr 02 '23 12:04 yeshwantthota

oh thanks mate @yeshwantthota

niladrix719 avatar Apr 02 '23 12:04 niladrix719

It happens to me when I refresh the page. I restart the server but it still keep blank.

Ethan9030 avatar Apr 03 '23 18:04 Ethan9030

It happens to me when I refresh the page. I restart the server but it still keep blank.

what error you are getting in the console?

yeshwantthota avatar Apr 04 '23 03:04 yeshwantthota

There were no errors on the console. The dev tools show it seems nothing was loaded. I just type the code again and it works😂.

Ethan9030 avatar Apr 04 '23 14:04 Ethan9030

Use react-parallax-tilt instead

Uninstall react tilt and install parallax tilt (npm install react-parallax-tilt) ,

import is almost the same, use import Tilt from 'react-parallax-tilt';

elvind007 avatar Apr 05 '23 08:04 elvind007

npm install react-parallax-tilt import Tilt from 'react-parallax-tilt'; replace // import Tilt from "react-tilt"; your code will working fine and please mark the issue solved

Noman-Nom avatar May 27 '23 07:05 Noman-Nom

npm install react-tilt import { Tilt } from "react-tilt";

talhanoman avatar Jun 04 '23 11:06 talhanoman

Use react-parallax-tilt instead

Uninstall react tilt and install parallax tilt (npm install react-parallax-tilt) ,

import is almost the same, use import Tilt from 'react-parallax-tilt';

This is working, Thanks for sharing

sedeeman avatar Jun 23 '23 21:06 sedeeman

It happens to me when I refresh the page. I restart the server but it still keep blank.

what error you are getting in the console?

import { Tilt } from "react-tilt"; it should be like this

it's working

CoorayNTL avatar Jun 24 '23 20:06 CoorayNTL

import { Tilt } from "react-tilt"; it should be like this

Thank you, I have been struggling for two days only to solve this error. This solved it. Than you man.

gadhane avatar Jun 28 '23 08:06 gadhane

welcome bro

Noman-Nom avatar Jul 26 '23 08:07 Noman-Nom

@Noman-Nom thanks for the help bro. but can you explain why that happens?

johnvnel avatar Jul 27 '23 02:07 johnvnel

Uncaught SyntaxError: The requested module '/node_modules/.vite/deps/react-tilt.js?v=3743f72a' does not provide an export named 'default' (at Works.jsx:2:8)

Rakeshkraki avatar Nov 20 '23 12:11 Rakeshkraki