Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find module '/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/extension_binary/grpc_node.node' #21

Closed
scampiuk opened this issue Mar 27, 2017 · 19 comments

Comments

@scampiuk
Copy link

Hi,

$ grpcc --proto ./some.proto --address someaddresss
module.js:328
    throw err;
    ^

Error: Cannot find module '/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/extension_binary/grpc_node.node'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)

@njpatel
Copy link
Owner

njpatel commented May 11, 2017

I just pushed a new release (0.0.7) with a bunch of fixes, could you please see if this is still an issue?

@har07
Copy link

har07 commented May 13, 2017

@njpatel How to install the latest, 0.0.7, version? Installing from npm gave version 0.0.6 for me, and then the above mentioned error occurred. Thanks in advance

@njpatel
Copy link
Owner

njpatel commented May 15, 2017

@har07 sorry, i meant 0.0.6 - can you share a proto file that causes the error? I can't reproduce it locally.

@har07
Copy link

har07 commented May 17, 2017

@njpatel I've just reinstall grpcc using npm, and I can confirm it works now! (not sure what was wrong the last time I tried). Tested, and worked, in both Windows 10 and Ubuntu 16.10.

@jeremyjjbrown
Copy link

jeremyjjbrown commented Jun 6, 2017

Same here:

sudo npm install -g grpcc
/usr/local/bin/grpcc -> /usr/local/lib/node_modules/grpcc/bin/grpcc.js
/usr/local/lib
└── grpcc@0.0.6 


 $ grpcc --proto ~/Dev/src/github.com/skizzehq/skizze/src/datamodel/protobuf/skizze.proto localhost:3596 -i
module.js:328
    throw err;
    ^

Error: Cannot find module '/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/extension_binary/grpc_node.node'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/src/grpc_extension.js:38:15)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)


 $ ls /usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node
ext  index.js  README.md  src

looks like maybe the wrong version of grpc installed. Maybe you need to freeze this "grpc": "^1.0.0",.

@mribeiro
Copy link

Having the same issue. @jeremyjjbrown , did you find a solution?

@helloandy11
Copy link

same issue even at grpcc -V and grpcc -H

@mribeiro @jeremyjjbrown @njpatel - how was this solved?

on ubuntu 16.04.2 LTS - did uninstall - reinstall of NPM, Node, NodeJs but no luck.
grpcc v0.0.6
node v4.2.6

@helloandy11
Copy link

ok. figured out what the problem is, the grpc inside the grpcc does not have all the required code. so did the following:
installed grpc using "npm install -g grpc", this will install grpc in a folder parallel to grpcc
next from the folder that has both grpc and grpcc "sudo cp -r grpc grpcc/node_modules" to copy over the new global grpc to the local one.
this fixed it for me.
good luck

@njpatel
Copy link
Owner

njpatel commented Jul 7, 2017

I'll update grpcc to the latest grpc sometime today

@njpatel
Copy link
Owner

njpatel commented Jul 7, 2017

I pushed up v0.0.8 which forces a minimum grpc version of 1.4.1. Obviously something changed between minor versions upstream but it hasn't been a major bump. Also this should stop npm from deciding not to update the deps of grpcc when you install/update. Re-open if there are any issues. Thanks!

@njpatel njpatel closed this as completed Jul 7, 2017
@danielsnider
Copy link

Got this issue on gcpcc 1.0.0. Any tips?

Installed for the first time today with sudo npm install -g grpcc.

npm list

dan@ubuntu:~/grpc/grpc/examples/node/dynamic_codegen$ npm -g list | head
/usr/local/lib
├─┬ grpcc@1.0.0
│ ├── colors@1.1.2
│ ├── commander@2.11.0
│ ├─┬ eval@0.1.2
│ │ └── require-like@0.1.2
│ ├─┬ grpc@1.6.6
│ │ ├── arguejs@0.2.3
│ │ ├── lodash@4.17.4
│ │ ├── nan@2.7.0

Error:

dan@ubuntu:~/grpc/grpc/examples/node/dynamic_codegen$ grpcc --proto /../../protos/helloworld.proto --address 127.0.0.1:50051                                            
module.js:328
    throw err;
    ^

Error: Cannot find module '/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/extension_binary/node-v46-linux-x64/grpc_node.node'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/grpcc/node_modules/grpc/src/node/src/grpc_extension.js:30:15)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)

@njpatel
Copy link
Owner

njpatel commented Oct 22, 2017

/../../protos/helloworld.proto, are you missing a . in front of that (or was a copy-paste error?)

@danielsnider
Copy link

Fixed the typo but the error is still happening.

dan@ubuntu:~/grpc/grpc/examples/node/dynamic_codegen$ file ../../protos/helloworld.proto
../../protos/helloworld.proto: Perl5 module source, ASCII text
dan@ubuntu:~/grpc/grpc/examples/node/dynamic_codegen$ grpcc --proto ../../protos/helloworld.proto --address 127.0.0.1:50051
module.js:328
    throw err;
    ^

Can I help you in any way possible?

@njpatel
Copy link
Owner

njpatel commented Oct 23, 2017

Sounds like you're hitting this? grpc/grpc#6435 (comment)

@njpatel
Copy link
Owner

njpatel commented Nov 2, 2017

@danielsnider someone else came across this and said that they had luck installing it locally (to user home dir) rather than with npm install -g - something to do with the gprc modules not being able to compile due to permissions. Might be worth a try.

@danielsnider
Copy link

danielsnider commented Nov 2, 2017 via email

@kirillgroshkov
Copy link

I have the same issue!

@njpatel
Copy link
Owner

njpatel commented Nov 10, 2017

@kirillgroshkov did you try #21 (comment) ?

@ivanivkovic
Copy link

ok. figured out what the problem is, the grpc inside the grpcc does not have all the required code. so did the following:
installed grpc using "npm install -g grpc", this will install grpc in a folder parallel to grpcc
next from the folder that has both grpc and grpcc "sudo cp -r grpc grpcc/node_modules" to copy over the new global grpc to the local one.
this fixed it for me.
good luck

I love you. This worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants