nikhilk / node-tensorflow

Node.js + TensorFlow
Apache License 2.0
587 stars 59 forks source link

Cannot find module 'protocol-buffers' #33

Open evanb2 opened 6 years ago

evanb2 commented 6 years ago

I'm on node v8.4.0

Install is ok. But getting the following error when trying to start my local server:

Error: Cannot find module 'protocol-buffers'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Path/to/project/node_modules/tensorflow/src/interop/api.js:13:18)
felipemullen commented 4 years ago

I've come across the same issue. You can run

npm install 'protocol-buffers'

to get rid of that error, but you end up with another error

throw new Error('Dynamic Linking Error: ' + err)
    ^

Error: Dynamic Linking Error: dlopen(/Users/fmullen/code/ml-learning/node_modules/tensorflow/lib/libtensorflow.dylib, 2): image not found
    at new DynamicLibrary (/Users/fmullen/code/ml-learning/node_modules/ffi/lib/dynamic_library.js:74:11)
    at Object.Library (/Users/fmullen/code/ml-learning/node_modules/ffi/lib/library.js:45:12)
    at Object.<anonymous> (/Users/fmullen/code/ml-learning/node_modules/tensorflow/src/interop/api.js:196:21)
    at Module._compile (internal/modules/cjs/loader.js:805:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:816:10)
    at Module.load (internal/modules/cjs/loader.js:672:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:612:12)
    at Function.Module._load (internal/modules/cjs/loader.js:604:3)
    at Module.require (internal/modules/cjs/loader.js:711:19)
    at require (internal/modules/cjs/helpers.js:14:16)