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

CLI doesn't work if node 9.x is installed #2758

Closed
ahmelsayed opened this issue Apr 27, 2018 · 16 comments
Closed

CLI doesn't work if node 9.x is installed #2758

ahmelsayed opened this issue Apr 27, 2018 · 16 comments

Comments

@ahmelsayed
Copy link
Contributor

From @Knaackee on November 27, 2017 17:34

I try to run the function emulator on my mac but get the following error on start.
Any ideas ?

$ func host start

......

info: Worker.Node.3dce2ab7-8ac1-43e8-97f0-88c8b2a8554d[0]
      Couldn't require bundle, falling back to Worker.js. Error: Cannot find module '/Users/myUsername/.azurefunctions/bin/workers/node/grpc/src/node/extension_binary/node-v59-darwin-x64/grpc_node.node'
info: Worker.Node.3dce2ab7-8ac1-43e8-97f0-88c8b2a8554d[0]
      module.js:544
info: Worker.Node.3dce2ab7-8ac1-43e8-97f0-88c8b2a8554d[0]
          throw err;
info: Worker.Node.3dce2ab7-8ac1-43e8-97f0-88c8b2a8554d[0]
          ^
info: Worker.Node.3dce2ab7-8ac1-43e8-97f0-88c8b2a8554d[0]
      Error: Cannot find module './Worker.js'

Copied from original issue: Azure/azure-functions-core-tools#326

@ahmelsayed
Copy link
Contributor Author

From @nagytech on November 27, 2017 19:23

Try installing with this: npm i -g azure-functions-core-tools@core --unsafe-perm

@ahmelsayed
Copy link
Contributor Author

From @Knaackee on November 28, 2017 9:41

I did that already and did it again. I have to use sudo though.
Sadly, this changes nothing.

@ahmelsayed
Copy link
Contributor Author

From @Knaackee on November 28, 2017 9:46

Found the problem. I had node version 9.2 installed. After downgrading to 8.9 its working now.

@ahmelsayed
Copy link
Contributor Author

From @compulim on December 11, 2017 3:40

The tool looks pretty broken now. @ahmelsayed are you looking at this?

@ahmelsayed
Copy link
Contributor Author

From @nelak on December 11, 2017 12:8

It looks like newer versions of node need a newer grpc extension, that's why going back to v8.9.0 is working. Node v9.2.0 would require node-v59-darwin-x64/grpc_node.node to work.

The Azure functions cli install only provides support for these extensions:

node-v48-win32-ia32
node-v57-darwin-ia32
node-v57-darwin-x64
node-v57-linux-ia32
node-v57-linux-x64
node-v57-win32-ia32
node-v57-win32-x64

@ahmelsayed
Copy link
Contributor Author

Thank you @Knaackee and @nelak for find the root cause of the issue. I'll update package.json to set 8.x as the upper bound of node, though for actual support of node 9.x the issue should go on the runtime repo here https://github.com/Azure/azure-webjobs-sdk-script/issues

@ahmelsayed
Copy link
Contributor Author

From @snobu on January 3, 2018 10:11

Just saving a few minutes for folks with Macs - to revert to Node 8.x:

% brew link node@8 --force                                                                        ~
Linking /usr/local/Cellar/node@8/8.9.4... 7 symlinks created

% node -v                                                                                         ~
v8.9.4

@ahmelsayed
Copy link
Contributor Author

From @jhealy on February 8, 2018 14:36

Any timeline for when this will work with node 9.x?

@ahmelsayed
Copy link
Contributor Author

From @jhealy on February 8, 2018 14:37

You can also fall back to the non-core version of cli by using the non-core version of node.
Install via "npm i -g azure-functions-core-tools" instead of "npm i -g azure-functions-core-tools@core".

@ahmelsayed
Copy link
Contributor Author

From @ntomsic on April 17, 2018 21:50

Any update on this? Huge hassle for Macs.

@ahmelsayed
Copy link
Contributor Author

From @PoisonousJohn on April 20, 2018 17:16

@ntomsic For linux as well

@ahmelsayed
Copy link
Contributor Author

From @ntomsic on April 26, 2018 14:53

And now we are at Node 10 for LTS.

@rogersnick
Copy link

Why is this closed?

@ahmelsayed
Copy link
Contributor Author

@harmonicradius it's not closed

@pragnagopa
Copy link
Member

Thanks for reporting. Here are tracking issues to update grpc:

Closing this as dup.

@jloveric
Copy link

jloveric commented May 4, 2018

I'm seeing the same problem. Our application requires node 9+.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants