Hi Team,
Am getting below error tried npm --prefix functions/ install in windows 10
C:\Users\Test\Downloads\smarthome-washer\washer-start>npm --prefix functions/ install
npm ERR! code ENOLOCAL
npm ERR! Could not install from "" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Test\AppData\Roaming\npm-cache_logs\2019-08-07T03_32_26_252Z-debug.log
C:\Users\Test\Downloads\smarthome-washer\washer-start>firebase use --add
? Which project do you want to add? smarthomeprojectforcodel-f0d40
? What alias do you want to use for this project? (e.g. staging) bathap
Created alias bathap for smarthomeprojectforcodel-f0d40.
Now using alias bathap (smarthomeprojectforcodel-f0d40)
C:\Users\Test\Downloads\smarthome-washer\washer-start>firebase deploy
! functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.
=== Deploying to 'smarthomeprojectforcodel-f0d40'...
i deploying database, functions, hosting
i database: checking rules syntax...
- database: rules syntax for database smarthomeprojectforcodel-f0d40 is valid
i functions: ensuring necessary APIs are enabled...
- functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
Error: Error parsing triggers: Cannot find module 'firebase-functions'
Try running "npm install" in your functions directory before deploying.
C:\Users\Test\Downloads\smarthome-washer\washer-start>npm --prefix functions/ install
npm ERR! code ENOLOCAL
npm ERR! Could not install from "" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Test\AppData\Roaming\npm-cache_logs\2019-08-07T03_33_53_110Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli '--prefix',
1 verbose cli 'functions/',
1 verbose cli 'install' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session 21d993010ea83c1a
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData error for file: Could not install from "" as it does not contain a package.json file.
8 timing stage:rollbackFailedOptional Completed in 1ms
9 timing stage:runTopLevelLifecycles Completed in 45ms
10 verbose stack Error: ENOENT: no such file or directory, open 'C:\Users\Test\Downloads\smarthome-washer\washer-start\package.json'
11 verbose cwd C:\Users\Test\Downloads\smarthome-washer\washer-start
12 verbose Windows_NT 10.0.18362
13 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "--prefix" "functions/" "install"
14 verbose node v10.16.2
15 verbose npm v6.9.0
16 error code ENOLOCAL
17 error Could not install from "" as it does not contain a package.json file.
18 verbose exit [ 1, true ]