I`ve installed:
npm 8.1.4
node 16.13.0
I'm trying to deploy some functions to the Firebase database for a Unity project, but an error returns when executing the firebase deploy command:
C:\Users\xxx\OneDrive\CloudFunction\FirebaseFunctions\functions>firebase deploy
=== Deploying to 'xxx'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> lint
> eslint .
C:\Users\xxx\OneDrive\CloudFunction\FirebaseFunctions\functions\index.js
47:95 error Parsing error: Unexpected token =>
✖ 1 problem (1 error, 0 warnings)
node:events:368
throw er; // Unhandled 'error' event
^
Error: spawn npm --prefix "%RESOURCE_DIR%" run lint ENOENT
at notFoundError (C:\Users\xxx\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\Users\xxx\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\xxx\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 (node:internal/child_process:290:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (C:\Users\xxx\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn npm --prefix "%RESOURCE_DIR%" run lint',
path: 'npm --prefix "%RESOURCE_DIR%" run lint',
spawnargs: []
}
Error: functions predeploy error: Command terminated with non-zero exit code1
As lint is new to me, what does the following error mean and how to resolve:
Error: spawn npm --prefix "%RESOURCE_DIR%" run lint ENOENT
The error is also pointing at this UploadAndCompressVideo function in the index.js:
exports.UploadAndCompressVideo = functions.runWith(vdeioUploadOpts).https.onCall(async (data) => {
...
});