0

I'm building an Angular + Firebase web app and due to some complex queries I started looking for Cloud Functions from firebase.

My project looks like:

MyProject
   |__ node_modules
   |__ src (with app and my complete project)
   |__ some files like tsconfig.json

So I add a repertory "functions" and I followed the classic tutorial: https://firebase.google.com/docs/functions/get-started

MyProject
   |__ node_modules
   |__ src (with app and my complete project)
   |__ some files like tsconfig.json
   |__ functions
           |__ node_modules
           |__ src

But problem when using firebase deploy --only functions

i  deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
npm ERR! path E:\Work\MyProject\%RESOURCE_DIR%\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'E:\Work\MyProject\%RESOURCE_DIR%\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

It creates a "%RESOURC_DIR%" folder but there is package.json inside.

Any idea ? Did I do something wrong ?

Versions: "firebase": "^5.0.4" "firebase-functions": "^2.0.5"

Emeric
  • 6,315
  • 2
  • 41
  • 54
  • What version of the Firebase CLI are you using? Did you do anything at all outside of following the exact instructions? – Doug Stevenson Sep 11 '18 at 16:20
  • My bad, forgot to write that: "firebase": "^5.0.4" "firebase-functions": "^2.0.5". No I didn't – Emeric Sep 11 '18 at 16:30
  • 1
    https://stackoverflow.com/a/48349057/7949696 Also, delete the %RESOURCE_DIR% directory that it accidentally created. – James Poag Sep 11 '18 at 16:37
  • What is the version of the CLI? Run `firebase --version`. – Doug Stevenson Sep 11 '18 at 16:53
  • @DougStevenson v4.2.1. JamesPoag Thank's ! I'm getting a lot of errors like ../node_modules/@types/jquery/index.d.ts(191,29): error TS2304: Cannot find name 'XMLHttpRequest'. now, I tried to change jquery version to jquery@2.0.47 as I saw (https://stackoverflow.com/questions/38283236/typescript-and-jquery-compile-error-cannot-find-name) but it hasn't solved my problem ! – Emeric Sep 11 '18 at 17:02
  • Everything you just said doesn't sound related to the original question. – Doug Stevenson Sep 11 '18 at 17:10
  • I followed what said James and it unlocked the situation so you are right it doesn't related to the original question but I'm getting new errors and I don't want to spam SO that's why I was asking here maybe it's just a little thing to do – Emeric Sep 11 '18 at 17:21
  • 1
    If you have a new question, it's always OK to simply ask it separately. It's more valuable to others if the question and answer aren't buried in comments of an unrelated question. – Doug Stevenson Sep 11 '18 at 21:18

0 Answers0