Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't walk dependency graph: Cannot find module './crypto_auth' sodium-universal

I am getting the following error when attempting to browserify a node project (https://github.com/datproject/sdk) and am getting the following error.

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

Usually I'd npm install the missing module. However, this doesn't work in this case. Also I can find no mention of crypt_auth anywhere in the project (the referencedindex.js has a single line module.exports = require('sodium-native'))

How do I debug this?

like image 968
atomh33ls Avatar asked Jan 31 '26 05:01

atomh33ls


1 Answers

After Paul90's comment here, I solved like this:

  1. cd into the yourPath/node_modules/sodium-universal/build-scripts dir
  2. run node generate.js
  3. go back to the sdk dir and run npm run build
like image 167
atomh33ls Avatar answered Feb 01 '26 19:02

atomh33ls



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!