technocreatives / node-red-contrib-jsonrpc2

Node Red wrapper around nodejs json-rpc2 implementation.
Other
4 stars 5 forks source link

Error installing - fatal: Not a git repository (or any of the parent directories): .git #3

Open mihalski opened 8 years ago

mihalski commented 8 years ago

Hi,

I just tried to install on a Raspberry Pi 3 running Raspbian Jessie with the Nodesource nodejs packages and received the following error:

pi@homepi:~/.node-red $ npm install node-red-contrib-jsonrpc2
-
> node-red-contrib-jsonrpc2@1.0.0 preinstall /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
> git submodule update --init

fatal: Not a git repository (or any of the parent directories): .git
npm ERR! Linux 4.4.21-v7+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-red-contrib-jsonrpc2"
npm ERR! node v4.6.1
npm ERR! npm  v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! node-red-contrib-jsonrpc2@1.0.0 preinstall: `git submodule update --init`
npm ERR! Exit status 128
npm ERR!
npm ERR! Failed at the node-red-contrib-jsonrpc2@1.0.0 preinstall script 'git submodule update --init'.
npm ERR! This is most likely a problem with the node-red-contrib-jsonrpc2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     git submodule update --init
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-red-contrib-jsonrpc2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR!     npm owner ls node-red-contrib-jsonrpc2
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/pi/.node-red/npm-debug.log

The contents of /home/pi/.node-red/npm-debug.log are:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   'node-red-contrib-jsonrpc2' ]
2 info using npm@2.15.9
3 info using node@v4.6.1
4 verbose install initial load of /home/pi/.node-red/package.json
5 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-alexa/package.json
6 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-avr-yamaha/package.json
7 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-deduplicate/package.json
8 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-find-my-iphone/package.json
9 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-lifx-api/package.json
10 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-lifx2/package.json
11 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-merge/package.json
12 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-openzwave/package.json
13 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-sunpos/package.json
14 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-contrib-web-worldmap/package.json
15 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-dashboard/package.json
16 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-node-ping/package.json
17 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-node-pushover/package.json
18 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/node-red-node-snmp/package.json
19 verbose installManyTop reading scoped package data from /home/pi/.node-red/node_modules/openzwave-shared/package.json
20 info package.json node-red-contrib-deduplicate@0.1.0 No license field.
21 info package.json node-red-contrib-merge@0.1.1 No repository field.
22 info package.json openzwave-shared@1.2.0 license should be a valid SPDX license expression
23 info package.json node-red-contrib-find-my-iphone@0.0.1 No repository field.
24 verbose readDependencies loading dependencies from /home/pi/.node-red/package.json
25 silly cache add args [ 'node-red-contrib-jsonrpc2', null ]
26 verbose cache add spec node-red-contrib-jsonrpc2
27 silly cache add parsed spec Result {
27 silly cache add   raw: 'node-red-contrib-jsonrpc2',
27 silly cache add   scope: null,
27 silly cache add   name: 'node-red-contrib-jsonrpc2',
27 silly cache add   rawSpec: '',
27 silly cache add   spec: 'latest',
27 silly cache add   type: 'tag' }
28 silly addNamed node-red-contrib-jsonrpc2@latest
29 verbose addNamed "latest" is being treated as a dist-tag for node-red-contrib-jsonrpc2
30 info addNameTag [ 'node-red-contrib-jsonrpc2', 'latest' ]
31 silly mapToRegistry name node-red-contrib-jsonrpc2
32 silly mapToRegistry using default registry
33 silly mapToRegistry registry https://registry.npmjs.org/
34 silly mapToRegistry data Result {
34 silly mapToRegistry   raw: 'node-red-contrib-jsonrpc2',
34 silly mapToRegistry   scope: null,
34 silly mapToRegistry   name: 'node-red-contrib-jsonrpc2',
34 silly mapToRegistry   rawSpec: '',
34 silly mapToRegistry   spec: 'latest',
34 silly mapToRegistry   type: 'tag' }
35 silly mapToRegistry uri https://registry.npmjs.org/node-red-contrib-jsonrpc2
36 verbose addNameTag registry:https://registry.npmjs.org/node-red-contrib-jsonrpc2 not in flight; fetching
37 verbose request uri https://registry.npmjs.org/node-red-contrib-jsonrpc2
38 verbose request no auth needed
39 info attempt registry request try #1 at 4:13:41 PM
40 verbose request id 6bbf79ab7f8e6716
41 http request GET https://registry.npmjs.org/node-red-contrib-jsonrpc2
42 http 200 https://registry.npmjs.org/node-red-contrib-jsonrpc2
43 verbose headers { server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
43 verbose headers   etag: '"2AN80Z00CJGCXAVNL5NQCRFVL"',
43 verbose headers   'content-type': 'application/json',
43 verbose headers   'content-encoding': 'gzip',
43 verbose headers   'cache-control': 'max-age=300',
43 verbose headers   'content-length': '1149',
43 verbose headers   'accept-ranges': 'bytes',
43 verbose headers   date: 'Thu, 27 Oct 2016 06:13:42 GMT',
43 verbose headers   via: '1.1 varnish',
43 verbose headers   age: '0',
43 verbose headers   connection: 'keep-alive',
43 verbose headers   'x-served-by': 'cache-syd1622-SYD',
43 verbose headers   'x-cache': 'MISS',
43 verbose headers   'x-cache-hits': '0',
43 verbose headers   'x-timer': 'S1477548822.216485,VS0,VE239',
43 verbose headers   vary: 'Accept-Encoding' }
44 silly get cb [ 200,
44 silly get   { server: 'CouchDB/1.5.0 (Erlang OTP/R16B03)',
44 silly get     etag: '"2AN80Z00CJGCXAVNL5NQCRFVL"',
44 silly get     'content-type': 'application/json',
44 silly get     'content-encoding': 'gzip',
44 silly get     'cache-control': 'max-age=300',
44 silly get     'content-length': '1149',
44 silly get     'accept-ranges': 'bytes',
44 silly get     date: 'Thu, 27 Oct 2016 06:13:42 GMT',
44 silly get     via: '1.1 varnish',
44 silly get     age: '0',
44 silly get     connection: 'keep-alive',
44 silly get     'x-served-by': 'cache-syd1622-SYD',
44 silly get     'x-cache': 'MISS',
44 silly get     'x-cache-hits': '0',
44 silly get     'x-timer': 'S1477548822.216485,VS0,VE239',
44 silly get     vary: 'Accept-Encoding' } ]
45 verbose get saving node-red-contrib-jsonrpc2 to /home/pi/.npm/registry.npmjs.org/node-red-contrib-jsonrpc2/.cache.json
46 verbose correctMkdir /home/pi/.npm correctMkdir not in flight; initializing
47 silly addNameTag next cb for node-red-contrib-jsonrpc2 with tag latest
48 silly addNamed node-red-contrib-jsonrpc2@1.0.0
49 verbose addNamed "1.0.0" is a plain semver version for node-red-contrib-jsonrpc2
50 silly mapToRegistry name node-red-contrib-jsonrpc2
51 silly mapToRegistry using default registry
52 silly mapToRegistry registry https://registry.npmjs.org/
53 silly mapToRegistry data Result {
53 silly mapToRegistry   raw: 'node-red-contrib-jsonrpc2',
53 silly mapToRegistry   scope: null,
53 silly mapToRegistry   name: 'node-red-contrib-jsonrpc2',
53 silly mapToRegistry   rawSpec: '',
53 silly mapToRegistry   spec: 'latest',
53 silly mapToRegistry   type: 'tag' }
54 silly mapToRegistry uri https://registry.npmjs.org/node-red-contrib-jsonrpc2
55 verbose addRemoteTarball https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz not in flight; adding
56 verbose addRemoteTarball [ 'https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz',
56 verbose addRemoteTarball   'ecefb230e8c2cc7171b420fc1151a7d600ef6769' ]
57 info retry fetch attempt 1 at 4:13:42 PM
58 info attempt registry request try #1 at 4:13:42 PM
59 http fetch GET https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz
60 http fetch 200 https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz
61 silly fetchAndShaCheck shasum ecefb230e8c2cc7171b420fc1151a7d600ef6769
62 verbose addTmpTarball /tmp/npm-15309-05e4f465/registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz not in flight; adding
63 verbose addTmpTarball already have metadata; skipping unpack for node-red-contrib-jsonrpc2@1.0.0
64 verbose correctMkdir /home/pi/.npm correctMkdir not in flight; initializing
65 silly cache afterAdd node-red-contrib-jsonrpc2@1.0.0
66 verbose afterAdd /home/pi/.npm/node-red-contrib-jsonrpc2/1.0.0/package/package.json not in flight; writing
67 verbose correctMkdir /home/pi/.npm correctMkdir not in flight; initializing
68 verbose afterAdd /home/pi/.npm/node-red-contrib-jsonrpc2/1.0.0/package/package.json written
69 silly install resolved [ { name: 'node-red-contrib-jsonrpc2',
69 silly install resolved     version: '1.0.0',
69 silly install resolved     description: 'Node RED wrapper arround a JSON RPC 2.0 implementation.',
69 silly install resolved     main: 'index.js',
69 silly install resolved     scripts:
69 silly install resolved      { test: 'echo "Error: no test specified" && exit 1',
69 silly install resolved        preinstall: 'git submodule update --init' },
69 silly install resolved     repository:
69 silly install resolved      { type: 'git',
69 silly install resolved        url: 'git+https://github.com/technocreatives/node-red-contrib-jsonrpc2.git' },
69 silly install resolved     bugs: { url: 'https://github.com/technocreatives/node-red-contrib-jsonrpc2/issues' },
69 silly install resolved     homepage: 'https://github.com/technocreatives/node-red-contrib-jsonrpc2#readme',
69 silly install resolved     'node-red': { nodes: [Object] },
69 silly install resolved     keywords: [ 'json', 'rpc', 'node-red' ],
69 silly install resolved     author: { name: 'oskar.hagberg@gmail.com' },
69 silly install resolved     license: 'ISC',
69 silly install resolved     dependencies: { 'json-rpc2': '^1.0.2' },
69 silly install resolved     gitHead: '69c75331360d0ddc75141bbc5ce94058974db6da',
69 silly install resolved     _id: 'node-red-contrib-jsonrpc2@1.0.0',
69 silly install resolved     _shasum: 'ecefb230e8c2cc7171b420fc1151a7d600ef6769',
69 silly install resolved     _from: 'node-red-contrib-jsonrpc2@latest',
69 silly install resolved     _npmVersion: '3.10.8',
69 silly install resolved     _nodeVersion: '6.5.0',
69 silly install resolved     _npmUser: { name: 'technocreatives', email: 'os@technocreatives.com' },
69 silly install resolved     dist:
69 silly install resolved      { shasum: 'ecefb230e8c2cc7171b420fc1151a7d600ef6769',
69 silly install resolved        tarball: 'https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz' },
69 silly install resolved     maintainers: [ [Object] ],
69 silly install resolved     _npmOperationalInternal:
69 silly install resolved      { host: 'packages-12-west.internal.npmjs.com',
69 silly install resolved        tmp: 'tmp/node-red-contrib-jsonrpc2-1.0.0.tgz_1476137730449_0.9437249118927866' },
69 silly install resolved     directories: {},
69 silly install resolved     _resolved: 'https://registry.npmjs.org/node-red-contrib-jsonrpc2/-/node-red-contrib-jsonrpc2-1.0.0.tgz' } ]
70 info install node-red-contrib-jsonrpc2@1.0.0 into /home/pi/.node-red
71 info installOne node-red-contrib-jsonrpc2@1.0.0
72 verbose installOne of node-red-contrib-jsonrpc2 to /home/pi/.node-red not in flight; installing
73 verbose correctMkdir /home/pi/.npm/_locks correctMkdir not in flight; initializing
74 verbose lock using /home/pi/.npm/_locks/node-red-contrib-jsonrpc-212ff8c59a827b95.lock for /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
75 silly install write writing node-red-contrib-jsonrpc2 1.0.0 to /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
76 verbose unbuild node_modules/node-red-contrib-jsonrpc2
77 silly gentlyRm /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2 is being purged from base /home/pi/.node-red
78 verbose gentlyRm don't care about contents; nuking /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
79 verbose tar unpack /home/pi/.npm/node-red-contrib-jsonrpc2/1.0.0/package.tgz
80 verbose tar unpacking to /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
81 silly gentlyRm /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2 is being purged
82 verbose gentlyRm don't care about contents; nuking /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
83 silly gunzTarPerm modes [ '755', '644' ]
84 silly gunzTarPerm extractEntry package.json
85 silly gunzTarPerm extractEntry .npmignore
86 silly gunzTarPerm extractEntry README.md
87 silly gunzTarPerm extractEntry LICENSE
88 silly gunzTarPerm extractEntry jsonrpc/jsonrpc.js
89 silly gunzTarPerm extractEntry jsonrpc/jsonrpc.html
90 verbose write writing to /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2/package.json
91 info preinstall node-red-contrib-jsonrpc2@1.0.0
92 verbose unsafe-perm in lifecycle true
93 info node-red-contrib-jsonrpc2@1.0.0 Failed to exec preinstall script
94 verbose unlock done using /home/pi/.npm/_locks/node-red-contrib-jsonrpc-212ff8c59a827b95.lock for /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
95 verbose stack Error: node-red-contrib-jsonrpc2@1.0.0 preinstall: `git submodule update --init`
95 verbose stack Exit status 128
95 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
95 verbose stack     at emitTwo (events.js:87:13)
95 verbose stack     at EventEmitter.emit (events.js:172:7)
95 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
95 verbose stack     at emitTwo (events.js:87:13)
95 verbose stack     at ChildProcess.emit (events.js:172:7)
95 verbose stack     at maybeClose (internal/child_process.js:829:16)
95 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
96 verbose pkgid node-red-contrib-jsonrpc2@1.0.0
97 verbose cwd /home/pi/.node-red
98 error Linux 4.4.21-v7+
99 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-red-contrib-jsonrpc2"
100 error node v4.6.1
101 error npm  v2.15.9
102 error code ELIFECYCLE
103 error node-red-contrib-jsonrpc2@1.0.0 preinstall: `git submodule update --init`
103 error Exit status 128
104 error Failed at the node-red-contrib-jsonrpc2@1.0.0 preinstall script 'git submodule update --init'.
104 error This is most likely a problem with the node-red-contrib-jsonrpc2 package,
104 error not with npm itself.
104 error Tell the author that this fails on your system:
104 error     git submodule update --init
104 error You can get information on how to open an issue for this project with:
104 error     npm bugs node-red-contrib-jsonrpc2
104 error Or if that isn't available, you can get their info via:
104 error
104 error     npm owner ls node-red-contrib-jsonrpc2
104 error There is likely additional logging output above.
105 verbose exit [ 1, true ]
106 verbose unbuild node_modules/node-red-contrib-jsonrpc2
107 info preuninstall node-red-contrib-jsonrpc2@1.0.0
108 info uninstall node-red-contrib-jsonrpc2@1.0.0
109 verbose unbuild rmStuff node-red-contrib-jsonrpc2@1.0.0 from /home/pi/.node-red/node_modules
110 info postuninstall node-red-contrib-jsonrpc2@1.0.0
111 silly gentlyRm /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2 is being purged from base /home/pi/.node-red
112 verbose gentlyRm don't care about contents; nuking /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
113 silly vacuum-fs purging /home/pi/.node-red/node_modules/node-red-contrib-jsonrpc2
114 silly vacuum-fs quitting because other entries in /home/pi/.node-red/node_modules

Has anyone else encountered this and/or know how to solve it?

Regards, Michal

camilleb commented 7 years ago

I've got the same error too.

pckhib commented 7 years ago

The problem is the preinstall hook in the package.json which wants to run git submodule update. But as there is not git repository initialized, it can't do that.

The solution would be to remove the preinstall hook, as there are no submodules anyway.