devs, I'm trying to deploy a simple cloud function to the firebase console, everything working very well (installation of npm & configuration & other stuff...).

then I wrote a simple function in the **index.js** file :

```
'use strict'
const functions = require("firebase-functions");
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);

exports.sendNotification  = functions.database.ref('/notififcation/{user_id}/{notififcation_id}').onWrite(

event =>
       {
    const user_id = event.params.user_id;
    const notififcation_id = event.params.notififcation_id;
    console.log('this id is the ' , user_id);

       }
):

```

then, when I wanna deploy it to firebase with this command **firebase deploy**, This error keeps appearing,
this is the error :

---

```
C:\Users\nasro\Desktop\oussamaproject\notifyfun\functions\index.js
  14:2  error  Parsing error: Unexpected token :

? 1 problem (1 error, 0 warnings)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions@ lint script.
npm ERR! This is probably not a problem with npm. There is likely additional l
ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\nasro\AppData\Roaming\npm-cache\_logs\2021-09-19T21_28_2
892Z-debug.log
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: spawn npm --prefix "C:\Users\nasro\Desktop\oussamaproject\notifyfun\fun
ions" run lint ENOENT
    at notFoundError (C:\Users\nasro\AppData\Roaming\npm\node_modules\firebase
ools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\nasro\AppData\Roaming\npm\node_modules\firebase-
ols\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
    at ChildProcess.cp.emit (C:\Users\nasro\AppData\Roaming\npm\node_modules\f
ebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:2

    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess.cp.emit (C:\Users\nasro\AppData\Roaming\npm\node_modules\f
ebase-tools\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:3

    at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn npm --prefix "C:\\Users\\nasro\\Desktop\\oussamaproject\\not
yfun\\functions" run lint',
  path: 'npm --prefix "C:\\Users\\nasro\\Desktop\\oussamaproject\\notifyfun\\f
ctions" run lint',
  spawnargs: []
}

Error: functions predeploy error: Command terminated with non-zero exit code1

```

so after searching for a solution in firebase documentation and articles, I tried those solutions

**solution one:**
in **firebase.json** by default:

```
"predeploy": [
  "npm --prefix \"$RESOURCE_DIR\" run lint"
]

```

i Modified it to:

```
"predeploy": [
  "npm --prefix \"%RESOURCE_DIR%\" run lint"
]

```

the error keeps appearing again with the same error message, so I tried solution 2

**Solution two**

I modified again the file **firebase.json** to :

```
"predeploy": [
         "npm --prefix \"%RESOURCE_DIR%\" run lint",
         "npm --prefix \"%RESOURCE_DIR%\" run build"
    ]

```

and the error keeps appearing again and again with the same error message (**btw** I'm using windows7)

So any solution or suggestions for this error ..
['https://Stackoverflow.com/questions/69247371', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15094547/']
try this

```
List<decimal> prices  = new List<decimal>();

decimal price=0;
int count=0;

        do
        {
            count++;
            Console.WriteLine("Item {0}", count);
            Console.WriteLine("     Enter Price: $ ");
            price = Convert.ToDecimal(Console.ReadLine());
            prices.Add(price);

        } while ( price != -1);

Console.WriteLine ("Price history:");

foreach(var item in prices)
{
        Console.WriteLine(item.ToString());
}

```
I would store your prices in a dictionary as to ensure that prices for the same item have not been added. Here is a fiddle with an example: <https://dotnetfiddle.net/uZQqDp>

```
public static void Main()
{
    Dictionary<int, decimal> prices = new Dictionary<int, decimal>();

    int count = 0;
    bool finished = false;
    do
    {
        Console.Write("Item {0}:\tEnter Price: $", count);

        var price = Console.ReadLine();
        var convertedPrice = Convert.ToDecimal(price);

        if(convertedPrice != -1)
        {
            prices.Add(count, convertedPrice);
            count++;
        }
        else
        {
            finished = true;
        }
    } while(!finished);

    Console.WriteLine("Price History");
    foreach(var price in prices)
    {
        Console.WriteLine("Item {0}:\tPrice: ${1}", price.Key, price.Value);
    }
}

```