I have Probleme with installing new packages with npm after I did an npm update with this commande : npm install -g npm@latest
in order to fix a problem related to install sqlite3 in node_modules of an electron app.
But after whene I try to run the commande of sqlite3 : npm install sqlite3 --save
or any other commande to install a new package it give this error:
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar ENOENT: no such file or directory, chmod 'C:\Users\Ahmed\Desktop\Desktop_stuffs\workspace\terrains\Gestion Ecole\electron-quick-start\node_modules\.staging\sqlite3-2e42d809'
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\Ahmed\Desktop\Desktop_stuffs\workspace\terrains\Gestion Ecole\electron-quick-start\node_modules\.staging\sax-8976b37c\lib\sax.js'
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN tar zlib: Cannot read property 'length' of null
npm WARN [email protected] requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zlib: Cannot read property 'length' of null
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\rijs.resdir\node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zlib: Cannot read property 'length' of null
npm ERR! zlib: Cannot read property 'length' of null
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ahmed\AppData\Roaming\npm-cache\_logs\2019-07-31T22_03_39_222Z-debug.log
running npm version
gives :
{'electron-quick-start': '1.0.0',
npm: '6.10.2',
ares: '1.13.0',
cldr: '32.0',
http_parser: '2.7.0',
icu: '60.1',
modules: '59',
nghttp2: '1.25.0',
node: '9.2.0',
openssl: '1.0.2m',
tz: '2017c',
unicode: '10.0',
uv: '1.16.1',
v8: '6.2.414.44-node.11',
zlib: '1.2.11' }
I fixed the issue, it was just a compatibility problem between npm and node, I used the last version of npm with an old version of nodes, So I just downloaded the last version of nodes to update it, and the install commands run normally.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments