我在尝试浏览 Node 项目 (https://github.com/datproject/sdk) 时遇到以下错误,并且遇到以下错误。
Error: Can't walk dependency graph: Cannot find module './crypto_auth' from 'C:\myPath\node_modules\sodium-universal\index.js'
required by C:\myPath\node_modules\sodium-universal\index.js
at C:\myPath\node_modules\resolve\lib\async.js:137:35
at load (C:\myPath\node_modules\resolve\lib\async.js:156:43)
at onex (C:\myPath\node_modules\resolve\lib\async.js:181:17)
at C:\myPath\node_modules\resolve\lib\async.js:15:69
at FSReqCallback.oncomplete (fs.js:158:21)
npm ERR! code ELIFECYCLE
通常我会npm install
缺少的模块。但是,这在这种情况下不起作用。此外,我在项目的任何地方都找不到提及 crypt_auth
(引用的 index.js
有一行 module.exports = require('sodium-native' )
)
我该如何调试?
最佳答案
在 Paul90 的评论之后 here ,我是这样解决的:
- 进入
yourPath/node_modules/sodium-universal/build-scripts
目录 - 运行
node generate.js
- 回到
sdk
目录并运行npm run build
关于javascript - 无法遍历依赖图 : Cannot find module './crypto_auth' sodium-universal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65543518/