Nuxt.js After npm run generate cannot find files












0















I’m trying to generate my app with npm run generate
on terminal. I’m not getting some error there is everything well generated. And in my development server everything work well routings components etc., but after generate when I open to index.html in dist folder I can’t access other pages, there are errors like that on chrome console.



Failed to load resource: net::ERR_FILE_NOT_FOUND
f8ff67c7350097487a5e.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
e63cddd635f290d15a6f.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
9a1a3c7742fdcce5403a.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
1e056384fb18617ca6a5.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
bde8656.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND


I try to upload dist folder to my ftp but there is too same…



here is my nuxt.config file



const pkg = require('./package')

module.exports = {
mode: 'universal',

/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},

/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },

/*
** Global CSS
*/
css: [
],

/*
** Plugins to load before mounting the App
*/
plugins: [
],

/*
** Nuxt.js modules
*/
modules: [
// Doc: https://github.com/nuxt-community/axios-module#usage
'@nuxtjs/axios',
// Doc:https://github.com/nuxt-community/modules/tree/master/packages/bulma
'@nuxtjs/bulma',
// ['nuxt-validate', {
// lang: 'tr',
// // regular vee-validate options
// }]
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
},

/*
** Build configuration
*/
build: {
postcss: {
preset: {
features: {
customProperties: false
}
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {

}
}
}









share|improve this question

























  • does your project load data from a server?.

    – Yoarthur
    Dec 31 '18 at 4:14











  • No. there is just one api call have which i make something with response thats all.

    – user3348410
    Dec 31 '18 at 4:23











  • How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

    – Aldarund
    Dec 31 '18 at 10:10











  • @Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

    – user3348410
    Dec 31 '18 at 10:13











  • Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

    – Aldarund
    Dec 31 '18 at 10:29
















0















I’m trying to generate my app with npm run generate
on terminal. I’m not getting some error there is everything well generated. And in my development server everything work well routings components etc., but after generate when I open to index.html in dist folder I can’t access other pages, there are errors like that on chrome console.



Failed to load resource: net::ERR_FILE_NOT_FOUND
f8ff67c7350097487a5e.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
e63cddd635f290d15a6f.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
9a1a3c7742fdcce5403a.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
1e056384fb18617ca6a5.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
bde8656.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND


I try to upload dist folder to my ftp but there is too same…



here is my nuxt.config file



const pkg = require('./package')

module.exports = {
mode: 'universal',

/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},

/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },

/*
** Global CSS
*/
css: [
],

/*
** Plugins to load before mounting the App
*/
plugins: [
],

/*
** Nuxt.js modules
*/
modules: [
// Doc: https://github.com/nuxt-community/axios-module#usage
'@nuxtjs/axios',
// Doc:https://github.com/nuxt-community/modules/tree/master/packages/bulma
'@nuxtjs/bulma',
// ['nuxt-validate', {
// lang: 'tr',
// // regular vee-validate options
// }]
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
},

/*
** Build configuration
*/
build: {
postcss: {
preset: {
features: {
customProperties: false
}
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {

}
}
}









share|improve this question

























  • does your project load data from a server?.

    – Yoarthur
    Dec 31 '18 at 4:14











  • No. there is just one api call have which i make something with response thats all.

    – user3348410
    Dec 31 '18 at 4:23











  • How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

    – Aldarund
    Dec 31 '18 at 10:10











  • @Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

    – user3348410
    Dec 31 '18 at 10:13











  • Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

    – Aldarund
    Dec 31 '18 at 10:29














0












0








0








I’m trying to generate my app with npm run generate
on terminal. I’m not getting some error there is everything well generated. And in my development server everything work well routings components etc., but after generate when I open to index.html in dist folder I can’t access other pages, there are errors like that on chrome console.



Failed to load resource: net::ERR_FILE_NOT_FOUND
f8ff67c7350097487a5e.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
e63cddd635f290d15a6f.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
9a1a3c7742fdcce5403a.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
1e056384fb18617ca6a5.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
bde8656.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND


I try to upload dist folder to my ftp but there is too same…



here is my nuxt.config file



const pkg = require('./package')

module.exports = {
mode: 'universal',

/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},

/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },

/*
** Global CSS
*/
css: [
],

/*
** Plugins to load before mounting the App
*/
plugins: [
],

/*
** Nuxt.js modules
*/
modules: [
// Doc: https://github.com/nuxt-community/axios-module#usage
'@nuxtjs/axios',
// Doc:https://github.com/nuxt-community/modules/tree/master/packages/bulma
'@nuxtjs/bulma',
// ['nuxt-validate', {
// lang: 'tr',
// // regular vee-validate options
// }]
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
},

/*
** Build configuration
*/
build: {
postcss: {
preset: {
features: {
customProperties: false
}
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {

}
}
}









share|improve this question
















I’m trying to generate my app with npm run generate
on terminal. I’m not getting some error there is everything well generated. And in my development server everything work well routings components etc., but after generate when I open to index.html in dist folder I can’t access other pages, there are errors like that on chrome console.



Failed to load resource: net::ERR_FILE_NOT_FOUND
f8ff67c7350097487a5e.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
e63cddd635f290d15a6f.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
9a1a3c7742fdcce5403a.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
1e056384fb18617ca6a5.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
bde8656.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/favicon.ico:1 Failed to load resource: net::ERR_FILE_NOT_FOUND


I try to upload dist folder to my ftp but there is too same…



here is my nuxt.config file



const pkg = require('./package')

module.exports = {
mode: 'universal',

/*
** Headers of the page
*/
head: {
title: pkg.name,
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: pkg.description }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},

/*
** Customize the progress-bar color
*/
loading: { color: '#fff' },

/*
** Global CSS
*/
css: [
],

/*
** Plugins to load before mounting the App
*/
plugins: [
],

/*
** Nuxt.js modules
*/
modules: [
// Doc: https://github.com/nuxt-community/axios-module#usage
'@nuxtjs/axios',
// Doc:https://github.com/nuxt-community/modules/tree/master/packages/bulma
'@nuxtjs/bulma',
// ['nuxt-validate', {
// lang: 'tr',
// // regular vee-validate options
// }]
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
},

/*
** Build configuration
*/
build: {
postcss: {
preset: {
features: {
customProperties: false
}
}
},
/*
** You can extend webpack config here
*/
extend(config, ctx) {

}
}
}






vue.js vuejs2 nuxt.js






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 31 '18 at 4:01









braaterAfrikaaner

1,095517




1,095517










asked Dec 31 '18 at 3:42









user3348410user3348410

202415




202415













  • does your project load data from a server?.

    – Yoarthur
    Dec 31 '18 at 4:14











  • No. there is just one api call have which i make something with response thats all.

    – user3348410
    Dec 31 '18 at 4:23











  • How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

    – Aldarund
    Dec 31 '18 at 10:10











  • @Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

    – user3348410
    Dec 31 '18 at 10:13











  • Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

    – Aldarund
    Dec 31 '18 at 10:29



















  • does your project load data from a server?.

    – Yoarthur
    Dec 31 '18 at 4:14











  • No. there is just one api call have which i make something with response thats all.

    – user3348410
    Dec 31 '18 at 4:23











  • How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

    – Aldarund
    Dec 31 '18 at 10:10











  • @Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

    – user3348410
    Dec 31 '18 at 10:13











  • Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

    – Aldarund
    Dec 31 '18 at 10:29

















does your project load data from a server?.

– Yoarthur
Dec 31 '18 at 4:14





does your project load data from a server?.

– Yoarthur
Dec 31 '18 at 4:14













No. there is just one api call have which i make something with response thats all.

– user3348410
Dec 31 '18 at 4:23





No. there is just one api call have which i make something with response thats all.

– user3348410
Dec 31 '18 at 4:23













How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

– Aldarund
Dec 31 '18 at 10:10





How do u open your generated project? If you open your html file directly in browser it wont work. You need a http server

– Aldarund
Dec 31 '18 at 10:10













@Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

– user3348410
Dec 31 '18 at 10:13





@Aldarund i have upload content of dist folder to my ftp and there is too not working, I think problem is browser search _nuxt folder outside of root

– user3348410
Dec 31 '18 at 10:13













Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

– Aldarund
Dec 31 '18 at 10:29





Do u upload and access it via root domain e.g yourdomain.com ? or yourdomain.com/somedir ?

– Aldarund
Dec 31 '18 at 10:29












1 Answer
1






active

oldest

votes


















2














If you access it not via domain root you need to set it in nuxt config
https://nuxtjs.org/api/configuration-router/#base



export default {
router: {
base: '/app/'
}
}





share|improve this answer
























  • I will try it in a few hours thank you

    – user3348410
    Dec 31 '18 at 10:35











  • Worked as expected thank you:)

    – user3348410
    Dec 31 '18 at 15:57











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53983382%2fnuxt-js-after-npm-run-generate-cannot-find-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














If you access it not via domain root you need to set it in nuxt config
https://nuxtjs.org/api/configuration-router/#base



export default {
router: {
base: '/app/'
}
}





share|improve this answer
























  • I will try it in a few hours thank you

    – user3348410
    Dec 31 '18 at 10:35











  • Worked as expected thank you:)

    – user3348410
    Dec 31 '18 at 15:57
















2














If you access it not via domain root you need to set it in nuxt config
https://nuxtjs.org/api/configuration-router/#base



export default {
router: {
base: '/app/'
}
}





share|improve this answer
























  • I will try it in a few hours thank you

    – user3348410
    Dec 31 '18 at 10:35











  • Worked as expected thank you:)

    – user3348410
    Dec 31 '18 at 15:57














2












2








2







If you access it not via domain root you need to set it in nuxt config
https://nuxtjs.org/api/configuration-router/#base



export default {
router: {
base: '/app/'
}
}





share|improve this answer













If you access it not via domain root you need to set it in nuxt config
https://nuxtjs.org/api/configuration-router/#base



export default {
router: {
base: '/app/'
}
}






share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 31 '18 at 10:33









AldarundAldarund

7,34743460




7,34743460













  • I will try it in a few hours thank you

    – user3348410
    Dec 31 '18 at 10:35











  • Worked as expected thank you:)

    – user3348410
    Dec 31 '18 at 15:57



















  • I will try it in a few hours thank you

    – user3348410
    Dec 31 '18 at 10:35











  • Worked as expected thank you:)

    – user3348410
    Dec 31 '18 at 15:57

















I will try it in a few hours thank you

– user3348410
Dec 31 '18 at 10:35





I will try it in a few hours thank you

– user3348410
Dec 31 '18 at 10:35













Worked as expected thank you:)

– user3348410
Dec 31 '18 at 15:57





Worked as expected thank you:)

– user3348410
Dec 31 '18 at 15:57


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53983382%2fnuxt-js-after-npm-run-generate-cannot-find-files%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Monofisismo

Angular Downloading a file using contenturl with Basic Authentication

Olmecas