无法行走依赖关系图:找不到模块"./crypto_auth"钠通用



我在浏览节点项目时遇到以下错误(https://github.com/datproject/sdk)我得到以下错误。

Error: Can't walk dependency graph: Cannot find module './crypto_auth' from 'C:myPathnode_modulessodium-universalindex.js'
required by C:myPathnode_modulessodium-universalindex.js
at C:myPathnode_modulesresolvelibasync.js:137:35
at load (C:myPathnode_modulesresolvelibasync.js:156:43)
at onex (C:myPathnode_modulesresolvelibasync.js:181:17)
at C:myPathnode_modulesresolvelibasync.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在这里发表评论后,我这样解决了问题:

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

最新更新