George Ochieng
George Ochieng

Reputation: 41

Firebase deploy Error Enoent

When i run command deploy i get the following error:

npm ERR! path C:\Users\hp\nodes\%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 'C:\Users\hp\nodes\%RESOURCE_DIR%\package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\hp\AppData\Roaming\npm-cache\_logs\2018-06-23T06_43_17_023Z-debug.log

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

and this is on the log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   '--prefix',
1 verbose cli   '%RESOURCE_DIR%',
1 verbose cli   'run',
1 verbose cli   'lint' ]
2 info using [email protected]
3 info using [email protected]
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\hp\nodes\%RESOURCE_DIR%\package.json'
5 verbose cwd C:\Users\hp\nodes
6 verbose Windows_NT 10.0.17134
7 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\hp\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "--prefix" "%RESOURCE_DIR%" "run" "lint"
8 verbose node v8.11.3
9 verbose npm  v6.1.0
10 error path C:\Users\hp\nodes\%RESOURCE_DIR%\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\Users\hp\nodes\%RESOURCE_DIR%\package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]

I wonder....please help

Upvotes: 4

Views: 2492

Answers (1)

Dinusha Thilakarathna
Dinusha Thilakarathna

Reputation: 422

You have to change firebase.json as show in below

{"functions": {"predeploy": ["npm --prefix functions run lint","npm --prefix functions run build"]}}

Upvotes: 2

Related Questions