我在浏览节点项目时遇到以下错误(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在这里发表评论后,我这样解决了问题:
- cd到
yourPath/node_modules/sodium-universal/build-scripts
目录 - 运行
node generate.js
- 返回到
sdk
目录并运行npm run build