Google Cloud Speech Recognition grpc version incompatible with VSCode Electron Version - node.js

My goal is to develop a VS Code extension with speech recognition, ideally via google's API.
When attempting to import and use #google-cloud/speech, the following error is thrown at runtime:
Error: #grpc/grpc-js only works on Node ^8.13.0 || >=10.10.0
VS Code (as of 6/20/2019) is running electron 3.18 and node.js 10.2.0. Does this mean there is no way to work around this issue?
I'm following this tutorial: https://cloud.google.com/speech-to-text/docs/streaming-recognize

Sounds like it should work starting with the next release then. From the preliminary 1.36 release notes:
The Electron version that VS Code runs on has been updated and brings with it an update to Node.js from 10.2.0 to 10.11.0. All extensions will now run on this newer version of Node.js.
To make sure, you can try an Insider's build.
Generally speaking though, there's no way to control what Node version VSCode extension run on (see here), so I guess you got lucky here. :)

Related

iOS Nest Firebase Framework [nest-api]

I am currently using Firbase 1.2.3 provided with the Nest SDK for iOS. I have found that the Firebase Framework provided is so dated it cannot built with Bitcode enabled. This means I cannot build the whole project with Bitcode support. It appears from the documentation they are still pushing Firebase, however in practice they are not updating it. For example, I believe Firebase is currently up to version 2.3.4 (Bitcode Supported). When I use the later version the authorization process is unstable and can take a long time. Has anyone been successful and using a more recent Firebase Framework?

What local node-version is recommended for AWS Lambda and Serverless

Starting with AWS-Lambda and the Serverless Framework i am confused about node versions:
The AWS help site says that (on 21-March-2016)
AWS Lambda supports the following runtime versions:
Node.js: v0.10.36
So i did install Node.js v0.10.36 on my local machine. Installing the latest (v 0.4.2) serverless framework via
npm install serverless -g
it gives the following warning:
npm WARN engine serverless#0.4.2: wanted: {"node":">=4.0"} (current:
{"node":"0.10.36","npm":"1.4.28"})
I thought having the same version locally as on AWS might help having a consistent development environment... Am i wrong? What Node.js version should i run locally to get the most out of serverless?
The Serverless Framework requires Node.js v4.0 or higher. Any version of Node.js within the v4.x or v5.x lines should work.
You are correct that AWS Lambda currently only supports Node.js v0.10.36. The decision to build the Serverless Framework on Node.js v4.0 was done in anticipation that AWS Lamabda would eventually support Node.js v4.0 or higher.
When developing code for AWS Lambda, you should continue to only use features compatible with Node.js v0.10.36. If you make any contributions to the framework, you can use Node.js features available in v4.0+.
Another option is to use Babelify to transform your ES2015 code uploading to AWS Lambda. This allows you to develop in ES2015 without having to wait for AWS Lambda to officially support it. This can be done automatically each time you deploy with the Serverless Framework using the Optimizer Plugin.
Update: A new option now exists, the Serverless Babel Runtime. This goes one step beyond what Optimizer does, and uses Babel inside the runtime itself.
Update 2: AWS Lambda now supports Node.js v4.3.
If you are starting out with a brand new, fresh project I would highly avoid starting with node 0.10.x. That version is just receiving important security fixes at this point, and only for another five months (until October 2016).
The Node.js has adopted the common Long Term Support (LTS) pattern to keep releases timely and stable. Here is the current LTS plan for node.
I would highly recommend starting out with version 4 or 5, depending on your appetite for change and keeping your project up to date. You will be able to take advantage of numerous new features over the 0.10/0.12 releases as well as better prepare you for ES6.

Depending on lots of npm from vscode module…?

I'm just starting out trying to integrate Ensime scala ide-support into vscode. I have pulled out some of the integration parts from my atom package https://github.com/ensime/ensime-atom into https://github.com/ensime/ensime-node.
However, when depending on this from vscode I get red squigglies that it can't be found:
However, code still build and runs just fine. I got worried. I found this:
Q: Can I use native Node.js modules with my extension?
A: A Visual Studio Code extension package contains all of its
dependencies. This means that if you develop your extension on Windows
and depend on a native Node.js module when you publish that extension,
the Windows compiled native dependency will be contained in your
extension. Users on OS X or Linux won't be able to use the extension.
The only way to make this work for now is to include binaries for all
four platforms of VS Code (Windows x86 and x64, Linux, OS X) in your
extension and have code that dynamically loads the right one.
What does this mean? I can't use fs, net, child_process and the like? Kindof need them all I think or does vscode provide all that through abstraction layers?
You do have the basic node modules (fs, etc) already included as part of the dependency of vscode itself.
Did you remember to include this module in your package.json file as a dependency?
A way to check this would be to clean your code, put it in a new folder, and run "npm install" - if everything then runs fine, you are good to go.
See this docs:
https://code.visualstudio.com/Docs/extensionAPI/extension-manifest
Be sure to also read up on the new extension authoring update in the latest version: https://code.visualstudio.com/Updates

Can I use ES6 modules in a Node.js application and debug it in Visual Studio?

I've tried building a basic node.js ES6 module test project in Visual Studio 2015. But I get build errors and cannot run or debug the application in VS.
Have I just came to the party too early?
If it's worth anything I have tried opening and building the project in both VS2013 (Update 3) and VS2015 RC.
I have installed:
Node.js 0.12.2
Node.js Tools 1.0 for VS2013
Node.js Tools 1.1 Beta for VS2015
Additionally, I have added Robert Penners () node.d.ts gist to get over the import syntax errors.
See: https://gist.github.com/robertpenner/7d48f184df1236c4fdca
I have uploaded the project for others to try: https://dl.dropboxusercontent.com/u/10159140/es6-modules-ts.zip
Node Tools dev here. Thanks for reporting this. Indeed, we support the ES6 typescript target type.
That said, I'm running into issues running your app in the command line altogether with the latest versions of both node and io.js, so this may be a level of ES6 support mismatch between all the components at play here... Have you managed to successfully run your app in the command line (without the debugger)? Otherwise it may be related to this discussion:
https://github.com/nodejs/io.js/issues/1000
Once you figure that out, be sure to set up your project with the right node.exe arguments (harmony flag and whatnot) in project properties, so Visual Studio knows how to run it too.
Hope that helps!
P.S. just an fyi - we've moved to GitHub now, so please post issues there (rather than on CodePlex) for the quickest responses.
https://github.com/Microsoft/nodejstools

Can I use Mongodb in node.js without Visual Studio on Win 7? [duplicate]

trying to install websockets on windows Node.js.
I am getting native extensions require Visual Studio and Python.
My question is : Is it possible to take another compiler? Or do I really need VS (3,6GB) Download or are there alternatives, since I don´t want to download that huge amount.
Linux has GGC , I suppose.
And do I need Python 2.X or Python 3.X.
Thanks for the replies.
Have a nice day.
You'll need visual studio in order to get the C++ compilers. You can pull down Visual Studio 2010 Express here, which is a much smaller download (694MB). For python, you'll need 2.6 or 2.7 as described on the node.js wiki on github.
Another alternate is to simply use the binaries already supplied by the node.js team. If you go this route, you won't have to compile the source yourself. From what I can tell, node should already support websockets. See a tutorial on how to set up a server using websockets here.
There are lots of ws-compatible JS-only modules which don't require C++ runtime/node/V8 headers/Waf/Python
Install node.js from pre-built package (~5mb download, includes npm), then do npm install sockjs (sockjs implements websockets server as one of available transports). Then connect using HTML5 webscockets client or using sockjs-client library.
List of other modules on Node.js wiki

Resources