adrianhajdin / project_3D_developer_portfolio

The most impressive websites in the world use 3D graphics and animations to bring their content to life. Learn how to build your own ThreeJS 3D Developer Portfolio today!
https://jsmastery.pro
6.1k stars 1.37k forks source link

React tilt issue #38

Open yeshwantthota opened 1 year ago

yeshwantthota commented 1 year ago

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

Smr777 commented 1 year ago

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

niladrix719 commented 1 year ago

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

yeshwantthota commented 1 year ago

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

niladrix719 commented 1 year ago

this is what i am getting after restart @yeshwantthota

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

yeshwantthota commented 1 year ago

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

niladrix719 commented 1 year ago

oh thanks mate @yeshwantthota

Ethan9030 commented 1 year ago

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

yeshwantthota commented 1 year ago

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?

Ethan9030 commented 1 year ago

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😂.

elvind007 commented 1 year ago

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';

Noman-Nom commented 1 year ago

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

talhanoman commented 1 year ago

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

sedeeman commented 1 year ago

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

CoorayNTL commented 1 year ago

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

gadhane commented 1 year ago

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.

Noman-Nom commented 1 year ago

welcome bro

johnvnel commented 1 year ago

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

Rakeshkraki commented 12 months ago

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)