0

I'm using Firebase to create a web app, and I'm suddenly unable to deploy my app.

When I run firebase deploy in the correct directory. It creates a folder called $RESOURCE_DIR with one folder inside. It then states it cannot find package.json.

This file is in my functions folder, where it's always been. I copied this over to $RESOURCE_DIR and then states it cannot find the modules. Therefore I'm assuming it's searching the wrong folder.

I don't believe I've done anything I don't usually do when working with my app, so I would really appreciate some help.

I've updated Node.js using their website, and I've checked the local directory to ensure it's correct.

Below is the error code:

0 info it worked if it ends with ok
1 verbose cli [ 'Programs\\Node.js\\node.exe',
1 verbose cli   'AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   '--prefix',
1 verbose cli   '$RESOURCE_DIR',
1 verbose cli   'run',
1 verbose cli   'lint' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 verbose stack Error: ENOENT: no such file or directory, open 'Site\Website 20.12.2017\$RESOURCE_DIR\package.json'
5 verbose cwd Site\Website 20.12.2017
6 verbose Windows_NT 10.0.16299
7 verbose argv "Programs\\Node.js\\node.exe" "AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "--prefix" "$RESOURCE_DIR" "run" "lint"
8 verbose node v9.4.0
9 verbose npm  v5.6.0
10 error path Site\Website 20.12.2017\$RESOURCE_DIR\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'Site\Website 20.12.2017\$RESOURCE_DIR\package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • Can you provide a little more context? What does your folder structure look like? What are you trying to copy over? Can you post the function you're trying to create from the index.js file in your functions folder? – JamWils Jan 23 '18 at 14:24
  • @JamWils it is essentially the same as the linked question. Still can't get it to work. I managed to get past the error by copying my functions folder (where it's meant to be searching) and pasted it in the $RESOURCE_DIR folder. However, my JavaScript wasn't being found. I would really appreciated some help on this. Was working fine before the update... –  Jan 25 '18 at 21:46

0 Answers0