Code Monkey home page Code Monkey logo

Comments (19)

helloandy11 avatar helloandy11 commented on June 12, 2024 5

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

from grpcc.

njpatel avatar njpatel commented on June 12, 2024 2

I'll update grpcc to the latest grpc sometime today

from grpcc.

har07 avatar har07 commented on June 12, 2024 1

@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

from grpcc.

har07 avatar har07 commented on June 12, 2024 1

@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.

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

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

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

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

from grpcc.

jeremyjjbrown avatar jeremyjjbrown commented on June 12, 2024

Same here:

sudo npm install -g grpcc
/usr/local/bin/grpcc -> /usr/local/lib/node_modules/grpcc/bin/grpcc.js
/usr/local/lib
└── [email protected] 


 $ 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",.

from grpcc.

mribeiro avatar mribeiro commented on June 12, 2024

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

from grpcc.

helloandy11 avatar helloandy11 commented on June 12, 2024

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

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

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!

from grpcc.

danielsnider avatar danielsnider commented on June 12, 2024

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
├─┬ [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]

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)

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

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

from grpcc.

danielsnider avatar danielsnider commented on June 12, 2024

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?

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

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

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

@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.

from grpcc.

danielsnider avatar danielsnider commented on June 12, 2024

from grpcc.

kirillgroshkov avatar kirillgroshkov commented on June 12, 2024

I have the same issue!

from grpcc.

njpatel avatar njpatel commented on June 12, 2024

@kirillgroshkov did you try #21 (comment) ?

from grpcc.

ivanivkovic avatar ivanivkovic commented on June 12, 2024

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.

from grpcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.