firebase-tools: Failed to Deploy - events.js:180 ENOENT

[REQUIRED] Environment info

firebase-tools@8.2.0

Windows 10 64bit

Trying to use a callback on a function in a promise chain, may have broke tslint/cross-env

[REQUIRED] Expected behavior

I expect firebase functions to deploy

[REQUIRED] Actual behavior

instead, I get the following error

Running command: npm --prefix "%RESOURCE_DIR%" run build

> functions@ build X:\Development\Development\4L\4L Domains\dev\firebase\functions
> tsc


events.js:180
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm --prefix "X:\Development\Development\4L\4L Domains\dev\firebase\functions" run build ENOENT
    at notFoundError (C:\Users\digim\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\digim\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (C:\Users\digim\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:25)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
Emitted 'error' event at:
    at ChildProcess.cp.emit (C:\Users\digim\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn npm --prefix "X:\\Development\\Development\\4L\\4L Domains\\dev\\firebase\\functions" run build',
  path: 'npm --prefix "X:\\Development\\Development\\4L\\4L Domains\\dev\\firebase\\functions" run build',
  spawnargs: []
}

I have tried, clearing node_modules, npm install, npm update, re-affirming firebase.json predeploy to be windows compatible. manual predeploy, nothing.

was working before update, been working on this project for 2 months and now it doesn’t work

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 18 (2 by maintainers)

Most upvoted comments

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@digimbyte I know this is incredibly frustrating but from what I can see here there’s an issue with your system and this is not a bug in firebase-tools (or if it is, it will not be possible for us to reproduce and debug it).

The error is happening when we try to spawn a subprocess to do npm run build in your Cloud Functions directory as a predeploy step.

You can probably create a super-simple reproduction yourself by writing a short node script that uses Node’s child_process.spawn() to spawn an npm subprocess. Assuming you get the same error, I’d ask on StackOverflow about possible issues with your system/install.

If you don’t get the same error let me know, then we can look deeper into the Firebase CLI.