willhlaw / node-firestore-backup-restore

Google Firebase Firestore backup and restore tool
91 stars 24 forks source link

Running "npm install" fails #39

Open Venryx opened 6 years ago

Venryx commented 6 years ago

When trying to install this package globally, I'm getting an error in npm.

C:\Users\Stephen>npm install -g firestore-backup-restore
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep npm ERR! write after end
npm ERR! prepareGitDep npm ERR! write after end
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_10_40_133Z-debug.log
npm ERR! prepareGitDep
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: @google-cloud/firestore@github:googleapis/nodejs-firestore.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_10_59_431Z-debug.log

The debug log file contents are here:

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   'install',
1 verbose cli   '-g',
1 verbose cli   'firestore-backup-restore' ]
2 info using npm@5.10.0
3 info using node@v8.11.2
4 verbose npm-session fdc375477b115df1
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 http fetch GET 200 https://registry.npmjs.org/firestore-backup-restore 301ms
8 silly pacote tag manifest for firestore-backup-restore@latest fetched in 396ms
9 timing stage:loadCurrentTree Completed in 922ms
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 timing stage:loadIdealTree:cloneCurrentTree Completed in 1ms
13 silly install loadShrinkwrap
14 timing stage:loadIdealTree:loadShrinkwrap Completed in 1ms
15 silly install loadAllDepsIntoIdealTree
16 silly resolveWithNewModule firestore-backup-restore@1.3.1 checking installable status
17 http fetch GET 200 https://registry.npmjs.org/babel-preset-env 239ms
18 http fetch GET 304 https://registry.npmjs.org/colors 246ms (from cache)
19 http fetch GET 304 https://registry.npmjs.org/babel-runtime 251ms (from cache)
20 silly pacote range manifest for colors@^1.1.2 fetched in 256ms
21 silly resolveWithNewModule colors@1.3.1 checking installable status
22 silly pacote range manifest for babel-runtime@^6.26.0 fetched in 261ms
23 silly resolveWithNewModule babel-runtime@6.26.0 checking installable status
24 http fetch GET 304 https://registry.npmjs.org/mkdirp 259ms (from cache)
25 http fetch GET 304 https://registry.npmjs.org/json-stable-stringify 262ms (from cache)
26 http fetch GET 304 https://registry.npmjs.org/babel-cli 267ms (from cache)
27 http fetch GET 200 https://registry.npmjs.org/commander 267ms
28 silly pacote range manifest for mkdirp@^0.5.1 fetched in 266ms
29 silly resolveWithNewModule mkdirp@0.5.1 checking installable status
30 silly pacote range manifest for babel-preset-env@^1.6.1 fetched in 273ms
31 silly resolveWithNewModule babel-preset-env@1.7.0 checking installable status
32 silly pacote range manifest for json-stable-stringify@^1.0.1 fetched in 270ms
33 silly resolveWithNewModule json-stable-stringify@1.0.1 checking installable status
34 silly pacote range manifest for babel-cli@^6.26.0 fetched in 277ms
35 silly resolveWithNewModule babel-cli@6.26.0 checking installable status
36 silly pacote range manifest for commander@^2.11.0 fetched in 273ms
37 silly resolveWithNewModule commander@2.16.0 checking installable status
38 http fetch GET 200 https://registry.npmjs.org/firebase-admin 273ms
39 silly pacote range manifest for firebase-admin@^5.4.3 fetched in 284ms
40 silly resolveWithNewModule firebase-admin@5.13.1 checking installable status
41 http fetch GET 304 https://registry.npmjs.org/babel-preset-flow 985ms (from cache)
42 silly pacote range manifest for babel-preset-flow@^6.23.0 fetched in 987ms
43 silly resolveWithNewModule babel-preset-flow@6.23.0 checking installable status
44 verbose prepareGitDep undefined: installing devDeps and running prepare script.
45 error prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
45 error prepareGitDep npm ERR! write after end
45 error prepareGitDep npm ERR! write after end
45 error prepareGitDep
45 error prepareGitDep npm ERR! A complete log of this run can be found in:
45 error prepareGitDep npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_10_40_133Z-debug.log
46 silly fetchPackageMetaData error for @google-cloud/firestore@github:googleapis/nodejs-firestore Non-registry package missing package.json: @google-cloud/firestore@github:googleapis/nodejs-firestore.
47 timing stage:rollbackFailedOptional Completed in 1ms
48 timing stage:runTopLevelLifecycles Completed in 78846ms
49 verbose stack Error: Non-registry package missing package.json: @google-cloud/firestore@github:googleapis/nodejs-firestore.
49 verbose stack     at BB.join (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\pacote\lib\finalize-manifest.js:160:23)
49 verbose stack     at tryCatcher (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\util.js:16:23)
49 verbose stack     at Holder$5._callFunction (eval at generateHolderClass (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\join.js:92:16), <anonymous>:14:44)
49 verbose stack     at Holder$5.checkFulfillment (eval at generateHolderClass (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\join.js:92:16), <anonymous>:29:30)
49 verbose stack     at Promise.eval (eval at thenCallback (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\join.js:14:16), <anonymous>:6:20)
49 verbose stack     at Promise._settlePromise (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\promise.js:566:21)
49 verbose stack     at Promise._settlePromise0 (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\promise.js:614:10)
49 verbose stack     at Promise._settlePromises (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\promise.js:693:18)
49 verbose stack     at Promise._fulfill (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\promise.js:638:18)
49 verbose stack     at Object.<anonymous> (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\bluebird\js\release\nodeback.js:42:21)
49 verbose stack     at emitNone (events.js:111:20)
49 verbose stack     at Object.emit (events.js:208:7)
49 verbose stack     at Object.Parser.on._ (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\tar\lib\parse.js:75:14)
49 verbose stack     at emitTwo (events.js:126:13)
49 verbose stack     at Object.emit (events.js:214:7)
49 verbose stack     at Object.[emit] (C:\Users\Stephen\AppData\Roaming\nvm\v8.11.2\node_modules\npm\node_modules\tar\lib\parse.js:229:12)
50 verbose cwd C:\Users\Stephen
51 verbose Windows_NT 10.0.15063
52 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "firestore-backup-restore"
53 verbose node v8.11.2
54 verbose npm  v5.10.0
55 error code ENOPACKAGEJSON
56 error package.json Non-registry package missing package.json: @google-cloud/firestore@github:googleapis/nodejs-firestore.
57 error package.json npm can't find a package.json file in your current directory.
58 verbose exit [ 1, true ]

Node version: 8.11.2 NPM version: 5.10.0

Anyone know how to solve? (For now, I'll try cloning the repo and running npm install from there.)

Venryx commented 6 years ago

Okay, running npm install in the cloned repo doesn't work either.

I get a different error this way, though:

C:\Root\Apps\@V\@Tools\node-firestore-backup-restore\Main>npm install
npm WARN deprecated istanbul-lib-hook@1.2.1: 1.2.0 should have been a major version bump
npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep > grpc@1.13.1 install C:\Users\Stephen\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e8a39de6\node_modules\grpc
npm ERR! prepareGitDep > node-pre-gyp install --fallback-to-build --library=static_library
npm ERR! prepareGitDep
npm ERR! prepareGitDep [grpc] Success: "C:\Users\Stephen\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e8a39de6\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node" is installed via remote
npm ERR! prepareGitDep
npm ERR! prepareGitDep > protobufjs@6.8.8 postinstall C:\Users\Stephen\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e8a39de6\node_modules\protobufjs
npm ERR! prepareGitDep > node scripts/postinstall
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > @google-cloud/firestore@0.15.4 prepare C:\Users\Stephen\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e8a39de6
npm ERR! prepareGitDep > npm run compile
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep > @google-cloud/firestore@0.15.4 compile C:\Users\Stephen\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-e8a39de6
npm ERR! prepareGitDep > tsc -p . && cp -r protos build/protos && cp -r test/fake-certificate.json build/test/fake-certificate.json  && cp src/v1beta1/firestore_client_config.json build/src/v1beta1/ && cp conformance/test-definition.proto build/conformance && cp conformance/test-suite.binproto build/conformance
npm ERR! prepareGitDep
npm ERR! prepareGitDep
npm ERR! prepareGitDep 2> npm WARN install Usage of the `--dev` option is deprecated. Use `--only=dev` instead.
npm ERR! prepareGitDep node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! prepareGitDep 'cp' is not recognized as an internal or external command,
npm ERR! prepareGitDep operable program or batch file.
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! @google-cloud/firestore@0.15.4 compile: `tsc -p . && cp -r protos build/protos && cp -r test/fake-certificate.json build/test/fake-certificate.json  && cp src/v1beta1/firestore_client_config.json build/src/v1beta1/ && cp conformance/test-definition.proto build/conformance && cp conformance/test-suite.binproto build/conformance`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the @google-cloud/firestore@0.15.4 compile script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_21_45_804Z-debug.log
npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! @google-cloud/firestore@0.15.4 prepare: `npm run compile`
npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! Failed at the @google-cloud/firestore@0.15.4 prepare script.
npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_21_45_943Z-debug.log
npm ERR! prepareGitDep
npm ERR! code ENOPACKAGEJSON
npm ERR! package.json Non-registry package missing package.json: @google-cloud/firestore@github:googleapis/nodejs-firestore.
npm ERR! package.json npm can't find a package.json file in your current directory.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Stephen\AppData\Roaming\npm-cache\_logs\2018-07-27T06_21_46_209Z-debug.log
Venryx commented 6 years ago

I noticed a yarn.lock file in the repo, so I tried running yarn global add firestore-backup-restore.

That worked. I can now access the package globally. (well, after adding C\Users\Stephen\AppData\Local\Yarn\bin to my PATH environment variable)

Perhaps it's worth including a warning about the npm install not working for now. (assuming others get the same issue -- it's possible it's specific to my machine or version of npm, I suppose)