-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Website not built properly after running 'nuxt generate' #2636
Comments
Which |
I'm hosting project/dist
…On Jan 19, 2018 3:30 AM, "Limichange" ***@***.***> wrote:
which dist do you host ? project/dist or project/.nuxt/dist ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2636 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQA7ZLpK4mwQxZ66eA0dX-dQQjosErk8ks5tMFKsgaJpZM4Rj9wF>
.
|
Which version of nuxtjs are you using? |
It's 1.0.0
…---------------------
Shi Cheng
Georgia Institute of Technology [2017]
chengshi1219@gmail.com
470-435-9593
2018-01-19 8:21 GMT-05:00 Limichange <notifications@github.com>:
Which version of nuxtjs are you using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2636 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQA7ZAU1vWTI37Z56seKkjKtSwx5y1TAks5tMJa9gaJpZM4Rj9wF>
.
|
This project? |
Correct. I just updated it to the latest. Is there anything wrong with my
file structure?
…---------------------
Shi Cheng
Georgia Institute of Technology [2017]
chengshi1219@gmail.com
470-435-9593
2018-01-19 8:26 GMT-05:00 Limichange <notifications@github.com>:
This project?
https://github.com/rockcs1992/Personal-Website
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2636 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AQA7ZBNfYS_tqFZQP8VgATWF74wrRq1Cks5tMJgWgaJpZM4Rj9wF>
.
|
The router base in the nuxt.config.js makes everything point to root when generating static content. Changing it to either './' or /Portfolio/ (In your case) should fix it but breaks the npm run dev Documentation here I'm debugging a separate issue but this fixed it for both cases allowing me to use "npm run dev" and "npm run generate" properly You will need to update the nuxt.config.js router base and package.json generate script sections. |
@Zurnaz Thanks for your reply. I changed the router settings and the 'generate' script, but it doesn't seem to solve my problem. All the pages except for the homepage have a problem finding correct file path. Like the pic shows below. |
@rockcs1992 This is demo: https://limichange.github.io/Personal-Website/ and this is code https://github.com/limichange/Personal-Website. Some error i have fixed, you can look code. |
🤔 Maybe i should to update the nuxtjs document. |
@limichange Thanks so much helping me with this! Yeah I think the document might need to be clearer, especially to people who are not familiar with webpack. (like me) |
If you direct go to the page, browser get the html file, jquery plugin is fine, because image has load. But if you go to the page by click link, webpage update by loading js file, not html file. The jquery plugin has ran before you click link, jquery plugin can't find images, so you need to run it again. Run it at $('.works').mixItUp(); limichange/Personal-Website@5aa350e 😅 my english isn't great, can you understand it? |
@limichange I totally understand it. Thanks for your time and efforts! |
On GitHub Pages, you have to keep the I don't see this file in your project : https://github.com/rockcs1992/rockcs1992.github.io
|
@NicoPennec @rockcs1992 I know it now. Becase gh-pages don't upload |
I have tried with the @rockcs1992'project, it works fine on The issue come from Retry with this "deploy": "gh-pages --dist --dotfiles=true" |
How to fix this if using push-dir? I'm encountered this issue too. Edit: I'm sorry, looks like the problem from |
@IlhamWahabiGX You mean |
@limichange nope, I mean same error when this issue created. Its error both in my local and when I'm deploy it to github pages. Looks like its wrong import when do generate. When i change the index.html (from dist folder after But I don't know which part of nuxt.config.js to modify. NuxtJS version : 1.4.0 |
Looks like I should open new issue? |
@IlhamWahabiGX emmmm, yep, please open a new issue 😉 |
ok here it is |
@NicoPennec @williamchong007 Thank you for the |
* Add router base * Fix router and favicon * Use dotfiles true to fix problem nuxt/nuxt#2636 * Fix favicon too
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi guys, first of all let me say thanks for the amazing framework!
I'm building a personal website with nuxtJS these days. I have finished the development work however when I run
nuxt generate
and host the dist folder on my server, the website is not complete and something is different from how it looks in development mode.I have four pages in the site, and I put all of the images under
/static/img
folder. When I host the dist folder, it is trying to search image under/{pagename}/img
folder for each page, which is causing the images to break.Must I separate the images based on what page they belong to?Also, it seems that the files are not loaded correctly. The screenshot below is the first load of the site
Any ideas?
P.S. Url for the project: https://github.com/rockcs1992/Personal-Website
The text was updated successfully, but these errors were encountered: