【发布时间】:2019-12-09 11:37:55
【问题描述】:
在使用以下命令进行 npm 更新后,我在使用 npm 安装新软件包时遇到问题:npm install -g npm@latest 以解决与在电子应用程序的 node_modules 中安装 sqlite3 相关的问题。
但是当我尝试运行 sqlite3 的命令:npm install sqlite3 --save 或任何其他命令来安装新软件包时,它会给出此错误:
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 bootstrap@4.3.1 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: fsevents@2.0.7 (node_modules\fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: zlib: Cannot read property 'length' of null
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (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
运行npm version 给出:
{'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' }
【问题讨论】:
标签: node.js sqlite npm electron