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

Changes made in the source code doesn't affect the browser content. Three JS link problem. #7

Open
PranavBhattarai opened this issue Jul 16, 2021 · 2 comments

Comments

@PranavBhattarai
Copy link

My project directory is: /home/pranav/CodeSpace/Web/007

I followed all the instructions make in this video: https://www.youtube.com/watch?v=Q7AOvWpIVHU&t=196s

The only difference is the folder name, which is 007 in my case, and my project in your case.

image

I think there is a problem importing the three js libraries.
I used this line import * as THREE from 'three'; to import.

And when I ctrl-click on three, it will jump and open a file named index.d.ts with this content:

image

Is this normal? On the browser side, my page does load, but it's all bank and white with the website header named "Pranav". Any modifications done in main.js are not being loaded. Why?

In index.html file I have use this technique which link the file. <script type="module" src='./main.js'></script>
I wonder what's wrong.

@dannycyph3r
Copy link

I encountered the same issue,
Found a solution for this?

@bradene0
Copy link

bradene0 commented Mar 3, 2023

Hello! I encountered this issue as well and after some brainstorming I found a small typo. I had put the canvas id outside the tags. I also changed my main.js link in the src tag to src = "../main.js". Hope this helps!

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

3 participants