Pug view engine (using NodeJS and express) and firebase hosting not working well when deployed

345 views
Skip to first unread message

DisturbeD

unread,
Mar 16, 2020, 11:11:00 PM3/16/20
to Firebase Google Group

I'm using Express on NodeJS and I'm hosting my progressive web app using Google's Firebase Cloud. For my view engine I want to use Pug.


If I use the command firebase serve the app runs perfectly fine (runs on localhost) but after I try to use firebase deploy the link gets generated and the app shows up as Internal Server Error so my question is, what am I doing wrong here? I've tried to use npm run build but it gave me an error...

npm ERR! path C:\Users\Ricar\Documents\GitHub\NodeJS\package.json
npm ERR
! code ENOENT
npm ERR
! errno -4058
npm ERR
! syscall open
npm ERR
! enoent ENOENT: no such file or directory, open 'C:\Users\Ricar\Documents\GitHub\NodeJS\package.json'
npm ERR
! enoent This is related to npm not being able to find a file.
npm ERR
! enoent

npm ERR
! A complete log of this run can be found in:
npm ERR
!     C:\Users\Ricar\AppData\Roaming\npm-cache\_logs\2020-03-17T01_40_01_746Z-debug.log


Or even inside the functions folder


C:\Users\Ricar\Documents\GitHub\NodeJS\Harmlessly_v3\functions>npm run build
npm ERR
! missing script: build
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Ricar\AppData\Roaming\npm-cache\_logs\2020-03-17T01_41_04_908Z-debug.log


Any tips would be highly appreciated! Thanks!

Kato Richardson

unread,
Mar 18, 2020, 1:01:01 PM3/18/20
to Firebase Google Group
It looks like package.json doesn't exist. Did you remember to run npm init and npm --save <your modules here>?

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/6c096587-2c57-4c03-9a05-55eade4e36b0%40googlegroups.com.


--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Reply all
Reply to author
Forward
0 new messages