安装Lisk依赖项时出现NPM错误

时间:2017-10-20 15:00:55

标签: node.js npm blockchain

如何解决此npm install错误?

我克隆了Lisk blockchain application platform并运行了npm install,似乎无法找到解决方案。

我对npm的理解很浅,并且调试了这些类型的错误。

如果有人想教我如何更好地思考这些问题,以便我将来能够更好地解决这些问题,我将不胜感激。

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.6.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'install' ]
2 info using npm@5.5.1
3 info using node@v8.6.0
4 verbose npm-session 1b07b056f8329c9c
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall lisk@0.9.8
7 info lifecycle lisk@0.9.8~preinstall: lisk@0.9.8
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 silly install loadIdealTree
11 silly install cloneCurrentTreeToIdealTree
12 silly install loadShrinkwrap
13 silly install loadAllDepsIntoIdealTree
14 info lifecycle sodium@2.0.1~prepack: sodium@2.0.1
15 info lifecycle sodium@2.0.1~postpack: sodium@2.0.1
16 silly pacote git manifest for sodium@github:LiskHQ/node-sodium#716de00 fetched in 16581ms
17 silly resolveWithNewModule sodium@2.0.1 checking installable status
18 silly currentTree lisk@0.9.8
18 silly currentTree ├── abbrev@1.1.1
18 silly currentTree ├── accepts@1.3.4
18 silly currentTree ├─┬ acorn-dynamic-import@2.0.2
18 silly currentTree │ └── acorn@4.0.13
18 silly currentTree ├─┬ acorn-jsx@3.0.1
18 silly currentTree │ └── acorn@3.3.0
18 silly currentTree ├── acorn@5.1.2
18 silly currentTree ├── after@0.8.2
18 silly currentTree ├── ajv-keywords@2.1.0
18 silly currentTree ├── ajv@5.2.3
18 silly currentTree ├── align-text@0.1.4
18 silly currentTree ├── amdefine@1.0.1
...skipping...
in:/sbin
53 verbose lifecycle sodium@2.0.1~preinstall: CWD: /Users/sufuninja/Projects/lisk/node_modules/sodium
54 silly lifecycle sodium@2.0.1~preinstall: Args: [ '-c', 'node install.js --preinstall' ]
55 silly lifecycle sodium@2.0.1~preinstall: Returned: code: 1  signal: null
56 info lifecycle sodium@2.0.1~preinstall: Failed to exec preinstall script
57 verbose unlock done using /Users/sufuninja/.npm/_locks/staging-1493d57f2c36b5b7.lock for /Users/sufuninja/Projects/lisk/node_modules/.staging
58 verbose stack Error: sodium@2.0.1 preinstall: `node install.js --preinstall`
58 verbose stack Exit status 1
58 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:280:16)
58 verbose stack     at emitTwo (events.js:125:13)
58 verbose stack     at EventEmitter.emit (events.js:213:7)
58 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
58 verbose stack     at emitTwo (events.js:125:13)
58 verbose stack     at ChildProcess.emit (events.js:213:7)
58 verbose stack     at maybeClose (internal/child_process.js:927:16)
58 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
59 verbose pkgid sodium@2.0.1
60 verbose cwd /Users/sufuninja/Projects/lisk
61 verbose Darwin 16.7.0
62 verbose argv "/usr/local/Cellar/node/8.6.0/bin/node" "/usr/local/bin/npm" "install"
63 verbose node v8.6.0
64 verbose npm  v5.5.1
65 error code ELIFECYCLE
66 error errno 1
67 error sodium@2.0.1 preinstall: `node install.js --preinstall`
67 error Exit status 1
68 error Failed at the sodium@2.0.1 preinstall script.
68 error This is probably not a problem with npm. There is likely additional logging output above.

1 个答案:

答案 0 :(得分:1)

遇到lib钠失败。您正在使用

node v8.6.0
npm  v5.5.1

如果您已成功安装automake autoconf libtool,那么我建议使用

node v6.12.0
npm  v4.5.0

正如文档所示。