empierre / MyDomoAtHome

MyDomoAtHome - REST interface for ImperoHome with Domoticz (ISS)
http://domoticz.com/wiki/ImperiHome
GNU General Public License v3.0
32 stars 22 forks source link

Cannot upgrade 0.2.8 to 0.2.15 #148

Closed AlexKholodkov closed 6 years ago

AlexKholodkov commented 6 years ago

Hi, cannot upgrade 0.2.8 to 0.2.15 on Raspberry Pi Zero W `Preparing to unpack .../MyDomoAtHome_0.2.15_all.deb ... module.js:83 throw e; ^

SyntaxError: Error parsing /usr/local/lib/node_modules/npm/node_modules/config-c hain/node_modules/proto-list/package.json: Unexpected token y at Object.parse (native) at readPackage (module.js:79:52) at tryPackage (module.js:89:13) at Function.Module._findPath (module.js:152:20) at Function.Module._resolveFilename (module.js:335:25) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/usr/local/lib/node_modules/npm/node_modules/config-c hain/index.js:1:79) at Module._compile (module.js:435:26) dpkg: error processing archive /var/cache/apt/archives/MyDomoAtHome_0.2.15_all.d eb (--unpack): subprocess new pre-installation script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/MyDomoAtHome_0.2.15_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)`

empierre commented 6 years ago

Hello,

what is your nodejs version ?

node —version // should print version 4.4.x or similar npm —version // should print version 2.2.x or similar

AlexKholodkov commented 6 years ago

node -v v4.2.2 but cannot to check npm

npm -v module.js:83 throw e; ^

SyntaxError: Error parsing /usr/local/lib/node_modules/npm/node_modules/config-chain/node_modules/proto-list/package.json: Unexpected token y at Object.parse (native) at readPackage (module.js:79:52) at tryPackage (module.js:89:13) at Function.Module._findPath (module.js:152:20) at Function.Module._resolveFilename (module.js:335:25) at Function.Module._load (module.js:287:25) at Module.require (module.js:366:17) at require (module.js:385:17) at Object. (/usr/local/lib/node_modules/npm/node_modules/config-chain/index.js:1:79) at Module._compile (module.js:435:26)

empierre commented 6 years ago

this is your issue since NPM is missing, I don't know how bad is the pi 0 as I don't have one, but for PI1 to 3 I did propose this in the install steps:

On RASPBIAN (Raspberry PI/PI2/PI3), please install first to have a stable nodeJS : sudo apt-get remove node wget -q http://www.e-nef.com/domoticz/mdah/nodejs_4.4.2_armhf.deb sudo dpkg -i nodejs_4.4.2_armhf.deb wget -q http://www.e-nef.com/domoticz/mdah/npm_2.14.7_armhf.deb sudo dpkg -i npm_2.14.7_armhf.deb sudo npm install -g npm@2.x

AlexKholodkov commented 6 years ago

Thanks, I will try it. On other controllers, same Pi3 and Pine64 everything is ok

AlexKholodkov commented 6 years ago

wget -q http://www.e-nef.com/domoticz/mdah/nodejs_4.4.2_armhf.deb sudo dpkg -i nodejs_4.4.2_armhf.deb (Reading database ... 45598 files and directories currently installed.) Preparing to unpack nodejs_4.4.2_armhf.deb ... Unpacking nodejs (4.2.2) over (4.2.2) ... Setting up nodejs (4.2.2) ...

Why 4.2.2 over 4.2.2?

empierre commented 6 years ago

I did quote the whole part, just install the NPM below

empierre commented 6 years ago

hello any news ?