Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install again - npm WARN tarball tarball data for caseless@~0.12.0 (sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=) seems to be corrupted. #252

Closed
DJay-X opened this issue Apr 9, 2019 · 6 comments

Comments

@DJay-X
Copy link

DJay-X commented Apr 9, 2019

@oznu I'm on my Raspberry Pi on node@11.13.0 | npm 6.9.0 | n@3.0.2.
I installed/updatet config-ui-x by terminal, npm install -g --unsafe-perm homebridge-config-ui-x.
Unfortunately for whatever reason, config-ui-x is not showing any plugins anymore. Just loading circle. With previous version everything was going well since months.
I uninstalled config-ui-x by sudo npm remove --unsafe-perm -g homebridge-config-ui-x
And even after a restart of the Pi I can't get it back installed anymore.
Not the version 3.11.0 and also not back to 3.10.0.

pi@raspberrypi-3BPlus:~ $ sudo npm install -g --unsafe-perm homebridge-config-ui-x
npm ERR! Unexpected end of JSON input while parsing near '...164e22970df64c7abd6ad'
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-04-09T18_19_08_853Z-debug.log

After going back and forth and trying to install the "old" Version 3.10.0 even this is not working anymore.
Installation procedure get stuck, mostly by something like [ ......] / extract:lodash: sill extract lodash@^4.17.11 extracted to /usr/local/lib/node_modules/.staging/lodash-e1e3a35a (4900ms)

npm WARN tarball tarball data for caseless@~0.12.0 (sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=) seems to be corrupted. Trying one more time.
/usr/local/bin/homebridge-config-ui-x -> /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js

> node-pty@0.7.8 install /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty
> node scripts/install.js

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/11.13.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty/.node-gyp'
gyp ERR! System Linux 4.14.92-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty
gyp ERR! node -v v11.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty@0.7.8 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-pty@0.7.8 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2019-04-10T08_13_48_395Z-debug.log

Also a node rebuild didn't change anything.

cd /usr/local/lib/node_modules/
sudo npm rebuild --unsafe-perm

Homebridge and all other plugins still working great but can't get config-ui-x to install and run again. :(

Maybe not to see the wood for the trees
Any help and idea would be appreciated.
Thanks in advance.

2019-04-10T08_13_48_395Z-debug.log

@DJay-X DJay-X changed the title Can't install again -Unexpected end of JSON input while parsing Can't install again - npm WARN tarball tarball data for caseless@~0.12.0 (sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=) seems to be corrupted. Apr 10, 2019
@DJay-X
Copy link
Author

DJay-X commented Apr 10, 2019

Just a short update..
terminal command fixed the installation of 3.11.0 for me in some way.

sudo chown -R $USER /usr/local && npm install homebridge-Pluginname -g

Unfortunately I still see no installed plugins at all with config-ui-x anymore.
Just circle spinning endless.

This is new to whatever reason. Never had a problem like this before.

@oznu If there is anything I can help to investigate, please of course let me know.
Or hopefully its fixed with just a next update.

Thanks again.

@oznu
Copy link
Member

oznu commented Apr 10, 2019

Hi @DJay-X,

From the logs you have posted and the symptoms, my guess would be something is corrupted in your global modules or cache folder. The endless spinning on the plugins page would suggest an error is occuring when the plugin attempts to read one of the global modules package.json file.

@DJay-X
Copy link
Author

DJay-X commented Apr 10, 2019

Thanks for your reply. Strange thing. Just happens lately with the recent update.
Any idea how to get this fixed? I'm not a big expert, so any help is very appreciated.

@oznu
Copy link
Member

oznu commented Apr 11, 2019

I would probably start by doing a cleanup of your global modules. Remove any you don't need and reinstall the ones you do.

cd $(npm -g prefix)/lib/node_modules
ls - la

@DJay-X
Copy link
Author

DJay-X commented Apr 11, 2019

Thanks for this.
Strangely, the plugins showed up yesterday only when using iOS Safari. No luck on macOS Safari, Firefox...
One day later, without changing anything, the plugins also show up again on macOS Safari.
It's a mystery. ;)
However, thanks for your great work and support. I will close this issue here for now and hope everything will go smooth like it was for the last year or so. ;)
Thanks again.

@DJay-X DJay-X closed this as completed Apr 11, 2019
@oznu
Copy link
Member

oznu commented Apr 12, 2019

Happy to see you got it working again. In the next release I will prevent one corrupted module breaking the entire list installed plugins process; instead it will just not be displayed in the UI and an error will be logged showing what's wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants