gpt4 book ai didi

javascript - 无法遍历依赖图 : Cannot find module './crypto_auth' sodium-universal

转载 作者:行者123 更新时间:2023-12-04 03:43:34 25 4
gpt4 key购买 nike

我在尝试浏览 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 ,我是这样解决的:

  1. 进入 yourPath/node_modules/sodium-universal/build-scripts 目录
  2. 运行node generate.js
  3. 回到 sdk 目录并运行 npm run build

关于javascript - 无法遍历依赖图 : Cannot find module './crypto_auth' sodium-universal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65543518/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com