I am creating an app using electron framework but when I'm trying to use async functions it gives me an error.
Because my electron uses node version 6.5.0 but node in this version doesn't support async functions.
So I am trying to upgrade my electron's node but I don't know how to create a branch or stuff like that since https://electronjs.org/docs/development/upgrading-node is the only link I found to explain this matter but I can't understand it. Can I upgrade node in my electron framework in another way?
Can I upgrade node in my electron framework in another way
No, you cannot. Electron links a specific version of node with chromium in its build time, so each version of electron have a fixed version of node.js and cannot be replaced dynamically.
Either use a higher version of the electron have higher node.js version, try to manually build electron yourself is the only way to go.
Related
I have a node project in which I use NodeJS 14.15.0 and the latest build of Electron 12.0.0.
NodeJS version 14.15.0 has a NODE_MODULE_VERSION 83 according to their webpage.
Electron version v12.0.0 uses this node version of 14.15.0. but on their webpage it says the module NODE_MODULE_VERSION is 87
Therefore I have a mismatch between these two versions. I need a match so I can load the same binary intro an Electron app + execute by a node.js instance.
Electron maintains and compiles their own fork of Node, in a way that may not be compatible with normal Node. Electron intentionally uses unique NODE_MODULE_VERSION to signal this fact to software.
You'll need to recompile native modules using electron-rebuild.
Native Node modules are supported by Electron, but since Electron is very likely to use a different V8 version from the Node binary installed on your system, the modules you use will need to be recompiled for Electron.
(electron docs)
The maintainers of Node and Electron discussed possible options, and decided to use offset versioning in this issue:
https://github.com/nodejs/TSC/issues/651
I am trying to find to see if expressjs 4 can support Nodejs 10.15.3 ( Lts) version. Is there any compatibility matrix that i can look into before deciding versions to choose?
If you check out express/package.json you can see that express needs node v0.10.0 or newer.
So yes, Express.js v4 is supporting Node.js v10.15.3.
I get this message when I start a local Firebase server with firebase serve:
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
But there is no info about what to do. What do I need to do to downgrade Node.js to v6.11.5? Should I use that version just for Firebase projects and the latest released version of Node.js for other projects? In that case how to I do that?
EDIT: The warning now looks like this and I am unable to run a new nearly empty project:
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
! functions: Failed to load functions source code. Ensure that you have the latest SDK by running npm i --save firebase-functions inside the functions directory.
! functions: Error from emulator. mod.hasOwnProperty is not a function
So I really think I have to downgrande Node.js. But I do not know how to safely do that. Hm, looking at http://nodejs.org/ I can't even find version v6.11.5?
EDIT 2: Just checked in the new project if npm update --dev fixed the problem. It did not. (Actually no packages where updated.)
That's just a warning. You can ignore it if you know what you're doing. It's telling you that your local emulation of a function (running on node 8.9.4) may not perfectly match what the function will do when it's deployed to Cloud Functions (running 6.11.5). But as long as you're not using any features of node that are not available on node 6.11.5, you won't have a problem. I use newer versions of node to test locally all the time without problems.
You can uninstall and reinstall Cloud Functions emulator and Firebase Tools using the commands provided in the GitHub Troubleshooting guide. Since you are using Firebase, follow the instruction for the ‘Firebase Tools’.
Node v8 is now available for cloud functions:
https://firebase.googleblog.com/2018/08/cloud-functions-for-firebase-config-node-8-timeout-memory-region.html
So I believe this warning can truly be ignored...
There are several tools listed in the answers to this question
For Windows I just used nvmw successfully to accomplish this same task.
You will get the nvm here
After installation of nvm.
just use this command
"nvm install 8.9.1 64bit" you can use any version here or 64bit 32bit according to your system config
after that installation use
"nvm use 8.9.1"
I'm trying to install Angular-CLI to generate an angular2 project, but it seems that the cli generate an angular 4 project. how can I fix that ?
So jus to to save you some confusion, the latest version of Angular is 4.2.3, and I believe the CLI is at 1.1.2. The CLI will always configure your generate project to the the latest version of Angular (for the CLI).
Regardless of that, you shouldn't really stick on trying to create "Angular 2" applications. As a community the version number doesn't matter as much anymore. It's not like the migration from AngularJS (version 1) to Angular version 2. Angular version 4 is backwards compatible with Angular version 2. We aren't that concerned with version numbers. Anything and everything you do and how you do it in Angular version 2 will work as expected in the Angular version 4!
However by using the latest version you get new features (like the if/else directives).
Anyway, don't worry to much about the version number, you're just making Angular apps.
I know I can determine the version of Meteor with Meteor.release but is there a simple way to determine the node version Meteor is running on top of from a running Meteor app?
process.version
Meteor is built on top of Node.js and hence you've got access to the full Node API.