DEV Community

Discussion on: Deploy nuxt on Firebase

Collapse
 
micharied profile image
Micha

Hi there :)
Thank you for your tutorial.
I run into an error when i try to start d´the dev server. It looks like he cant find the server cant find the node modules. Does anybody has a similar problem?
Greetings Micha

My errorcode:
[nodemon] 1.19.4
[nodemon] to restart at any time, enter rs
[nodemon] watching dir(s): server
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node src/server/index.js
internal/modules/cjs/loader.js:796
throw err;
^

Error: Cannot find module '../nuxt.config.js'
Require stack:

  • C:\Users\m\Documents\nuxt-app\src\server\index.js at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17) at Function.Module._load (internal/modules/cjs/loader.js:686:27) at Module.require (internal/modules/cjs/loader.js:848:19) at require (internal/modules/cjs/helpers.js:74:18) at Object. (C:\Users\m\Documents\nuxt-app\src\server\index.js:7:16) at Module._compile (internal/modules/cjs/loader.js:955:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10) at Module.load (internal/modules/cjs/loader.js:811:32) at Function.Module._load (internal/modules/cjs/loader.js:723:14) at Function.Module.runMain (internal/modules/cjs/loader.js:1043:10) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\m\Documents\nuxt-app\src\server\index.js' ] } [nodemon] app crashed - waiting for file changes before starting...
Collapse
 
heyashh profile image
Ashh

my recent nuxt build doesn't have server folder for some reason

Collapse
 
wolfcoder profile image
bambang setyawan

i have some problem, i could not find server folder, i have develop in normal nuxt before

Thread Thread
 
abelmoremi profile image
Abel Moremi

Its probably caused by in the initial creation of your NUXT app, you did not choose an integrated server-side framework... the options were express, koa, hapi.. etc In this case you were supposed to choose Express... that's when the server folder will appear...

check this out, it gives you a step by step guide... read though it especially steps 1

Thread Thread
 
wolfcoder profile image
bambang setyawan

Thank you very much , I appreciate your reply.

Thread Thread
 
marcoraven profile image
marcoraven

My nuxt installation script didn't offer the option to choose an integrated server-side framework. What did I do wrong?

Collapse
 
itxp2008 profile image
itxp2008

same problem... managed to fix it?

Collapse
 
wfelipe99 profile image
Wevelly Felipe

It's giving an error because the directiores was changed and nuxt.config.js can't be found. Just go to src/server/index.js and change "const config = require('../nuxt.config.js')" to "const config = require('../../nuxt.config.js')".

Thread Thread
 
abelmoremi profile image
Abel Moremi

Thanks, was stuck for like 2 weeks on this part...