luke
December 1, 2020, 11:14am
16
Hi, @ismailalabou . You site build is creating a reference to a subdirectory in your javascript URLs.
For example, here is a script tag from the index.html file:
<script src="/developerFolio/static/js/2.eabd148f.chunk.js"></script>
This becomes the following URL for this site:
https://frosty-spence-f63eff.netlify.app/developerFolio/static/js/2.eabd148f.chunk.js
However, the subdirectory developerFolio
isn’t part of the deployed site. The correct URL is actually this:
https://frosty-spence-f63eff.netlify.app/static/js/2.eabd148f.chunk.js
So the script tag needs to be this:
<script src="/static/js/2.eabd148f.chunk.js"></script>
You will need to discover why that subdirectory is being included in the script tag to resolve this. If there are other questions or concerns, please let us know.
1 Like
hello @luke thanks for the feedback, I understand what you’re saying, now am aware of the source of the problem. am gonna try to solve it in the mean time & I will keep you posted if anything changes
am so confused because the structure seems fine to me (developerFolio directory below):
do you think “redirects rule” can solve my problem ?
perry
December 1, 2020, 5:35pm
19
hi there, quick question: is (index) a file called index.html?
hello @perry , yes index.html
luke
December 2, 2020, 3:24am
21
Hi, @ismailalabou . I see you have moved index.html outside of the developerFolio
directory now and so this URL loads the index.html
now:
https://frosty-spence-f63eff.netlify.app/
However, if you look at your browser’s dev tools (for example using chrome ), you will see 404s for these two URLs:
https://frosty-spence-f63eff.netlify.app/developerFolio/static/js/2.eabd148f.chunk.js
https://frosty-spence-f63eff.netlify.app/developerFolio/static/js/main.8a1aa5c0.chunk.js
This is because those files are also no longer redeployed under developerFolio
. The correct URLs are the ones below:
https://frosty-spence-f63eff.netlify.app/static/js/2.eabd148f.chunk.js
https://frosty-spence-f63eff.netlify.app/static/js/main.8a1aa5c0.chunk.js
The wrong URLs are being used being used because it is incorrect in your HTML. The two script tags look like this:
<script src="/developerFolio/static/js/2.eabd148f.chunk.js"></script>
<script src="/developerFolio/static/js/main.8a1aa5c0.chunk.js"></script>
However, the correct tags should (probably) be this:
<script src="/static/js/2.eabd148f.chunk.js"></script>
<script src="/static/js/main.8a1aa5c0.chunk.js"></script>
Please let us know there are other questions.
2 Likes
at homepage variable in the package.json file,the path was pointing to “/devoloperFolio”, I clear it.
it’s working now
1 Like
jaure96
December 5, 2020, 4:35pm
23
Hi all,
I have a similar problem…
I just uploaded and deployed my project to netlify. But when navigating to the page I see a white screen.
Inspecting the page I don’t see any errors. But the html code is not the same as the one generated locally
It is a react project!
Link : https://boring-elion-c6279f.netlify.app/
My package.json:
Thanks in advance,
Xabi
luke
December 7, 2020, 1:43am
24
Hi, @jaure96 . It looks like you both renamed the site and got it working. Would you be willing to share the solution you found here?
jaure96
December 11, 2020, 6:01am
27
Hi Luke,
I was using react-redux and react-router in my proyect.
I manage to solve the problem by adding two things:
Add a _redirect file in my /public folder, with this content inside:
/* /index.html 200
Add a netlify.tom file with this configuration:
[build]
command = "npm run build"
publish="build/"
base = "front/"
[[redirects]]
from = “/*”
to = “/index.html”
status = 200
Update my build setting:
I am duplicating the information in the file netlify.tom
I hope this can help someone else,
Xabi
I am also facing the same problem of a blank screen here’s the netlify url to my site
Hey there, @amantulsyan35
Can you give this thread a read and follow the suggestion? Let us know if this solves your issue.
My first time I deploy to Netlify. It is an existing github repo build on react.
I managed to publish the site:
11:58:44 AM: Starting post processing
11:58:44 AM: Post processing done
11:58:44 AM: Site is live
11:59:21 AM: Finished processing build request in 1m33.997954007s
But when I go to the link ( https://brave-lamarr-54a10a.netlify.app/ ) - it’s just a blank page.
Is there a rookie mistake I did?
Do I need the netlify.toml file and the use ‘build’ as publish directory?
Here’s the …
I have the same problem. I created a new application and running perfectly in my local but being blank in netlify.
I followed the instructions (creating a _redirect file in public folder as well as netlify.toml file in root, but receiving blank. I noticed, if I changed the title in index.html, i can see the new title but not being redirected.
Please, help.
@Luis_Adrian Have you seen this error message on your site?
Error: The '@emotion/core' package has been renamed to '@emotion/react'. Please import it like this 'import { jsx } from '@emotion/react'
.
I am facing the same problem, can you tell me what i am doing wrong ?
git repo – GitHub - tentamdin/tentamdin.github.io
netlify site – https://jolly-hamilton-3bf513.netlify.app/
@tentamdin What happens when you fix the errors in your code?
That’s the problem, I don’t understand the error. Can you let me know that error saying ?
Hey there, @tentamdin
We have some resources available for syntax error: unexpected token
. Check out this thread and the links that are included: [Support Guide] Why do I see “Uncaught SyntaxError: Unexpected token <” errors? How can I use chunking or versioning for my assets at Netlify?
Let us know how this goes!
Thanks a lot ! removing the homepage variable from package.json worked for me
1 Like