title: Hello I am getting error in deploying the function in firebase using javascript
body: <p>.eslintrx.js</p>
  <pre class="lang-js prettyprint-override"><code>module.exports = {
    root: true,
    env: {
      es6: true,
      node: true,
    },
    extends: [
      &quot;eslint:recommended&quot;,
      &quot;google&quot;,
    ],
    rules: {
      quotes: [&quot;error&quot;, &quot;double&quot;],
    },
  };
  </code></pre>
  <p>index.js</p>
  <pre><code>let functions = require('firebase-functions');
  let admin = require('firebase-admin');
  
  admin.initializeApp();
  
  exports.onConversationCreated;
  onConversationCreated = functions.firestore.document(&quot;Conversations/chatID&quot;).onCreate((snapshot, context) =&gt; {
      let data = snapshot.data();
      let chatID = context.params.chatID;
      if (data) {
        let members = data.members;
        for (let index = 0; index &lt; members.length; index++) {
          let currentUserID = members[index];
          let remainingUserIDs = members.filter((u= string) =&gt; u !== currentUserID);
          remainingUserIDs.forEach(async (m= string) =&gt; {
            try {
              let _doc = await admin.firestore().collection(&quot;Users&quot;).doc(m).get();
              let userData = _doc.data();
              if (userData) {
                return admin.firestore().collection(&quot;Users&quot;).doc(currentUserID).collection(&quot;Conversations&quot;).doc(m).create({
                  &quot;chatId&quot;: chatID,
                  &quot;image&quot;: userData.image,
                  &quot;name&quot;: userData.name,
                  &quot;unseenCount&quot;: 0,
                });
              }
              return null;
            } catch (e) {
              return null;
            }
          });
        }
      } return null;
    });
  </code></pre>
  <p>Error I getting:</p>
  <pre class="lang-none prettyprint-override"><code>C:\Users\TOHID\Desktop\chat_firebase_function&gt;firebase deploy --only functions
  
  === Deploying to 'chatapp-1b389'...
  
  i  deploying functions
  Running command: npm --prefix &quot;$RESOURCE_DIR&quot; run lint
  
  &gt; functions@ lint C:\Users\TOHID\Desktop\chat_firebase_function\functions
  &gt; eslint .
  
  
  C:\Users\TOHID\Desktop\chat_firebase_function\functions\index.js
    15:52  error  Parsing error: Unexpected token =&gt;
  
  ✖ 1 problem (1 error, 0 warnings)
  
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! functions@ lint: `eslint .`
  npm ERR! Exit status 1`enter code here`
  npm ERR! 
  npm ERR! Failed at the functions@ lint script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     C:\Users\TOHID\AppData\Roaming\npm-cache\_logs\2021-05-30T16_54_32_266Z-debug.log
  events.js:353
        throw er; // Unhandled 'error' event
        ^
  
  Error: spawn npm --prefix &quot;%RESOURCE_DIR%&quot; run lint ENOENT
      at notFoundError (C:\Users\TOHID\AppData\Roaming\npm\node_modules\firebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)    at verifyENOENT (C:\Users\TOHID\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\TOHID\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:277:12)
  Emitted 'error' event on ChildProcess instance at:
      at ChildProcess.cp.emit (C:\Users\TOHID\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 (internal/child_process.js:277:12) {
    code: 'ENOENT',
    errno: 'ENOENT',
    syscall: 'spawn npm --prefix &quot;%RESOURCE_DIR%&quot; run lint',
    path: 'npm --prefix &quot;%RESOURCE_DIR%&quot; run lint',
    spawnargs: []
  }
  
  Error: functions predeploy error: Command terminated with non-zero exit code1
  
  Having trouble? Try firebase [command] --help
  </code></pre>