Can you change the node version on tonicdev.com? - node.js

Tonic allows you to run node code in the browser ... https://tonicdev.com/
But its currently running 0.12.7 of node
Can you change the node version when using Tonic? i've searched but can't find anything - thought someone might now.
My npm module fails on anything below node 4.

you can in fact change the version, If you look under the title of the notebook you will see where it says "node 0.12" and if you click that you can select the version. Although the only currently supported versions are 0.10,0.12, and iojs 2.3. I would try seeing if iojs works for you, but if not, node 4 is coming shortly.

Related

Compatibility issues Node and Strapi4

allow me to walk you through some problems I'm encountering when setting up Gatsby with Strapi. Hopefully, somebody can provide me with a solution. Whenever I use the following command yarn create strapi-starter strapi-test gatsby-blog I get the following error:
So what I do next is switching to node v15 using nvm to make strapi compatible with node. The result being that some packages are being installed followed by yet another compatibility error:
Therefore, I am wondering what I am doing wrong and how to make strapi4 compatible with node without having the errors above?
Use Node.js v16 rather than v15. It should fix the issue.
Besides, it's better to use even-numbered version of Node.js, as they're LTS.

Which version of Socket.IO am I running?

Recently, I installed a new version of Socket.IO with npm. I tried using npm update socket.io, but that didn't seem to work for me because when I checked the version using npm list socket.io, it didn't show as a new version. So, I just used npm install socket.io, which seemed to work, because if I now go to Command Prompt, and enter the command npm list socket.io, I get this:
Brackets is my code editor, and this seems to indicate that it has its own installation of Socket.IO. is this a correct assumption? Anyway, before installing the new version of Socket.IO, the part saying socket.io#2.2.0 wasn't there.
So how do I know which one I'm running? I think it should be 2.2.0, but before installing it, because there was only the 1.1.0 version there, so I must've been originally running that.
By the way, what does extraneous mean in this sense? Thanks for any help.
Try this command, it will tell you the version which is currently being used for the project:
node -p "require('./package.json').version"
And also, it looks like you have a package.json file in brackets directory. I have no idea why. Maybe, it was installed as a part of dependency or it is a dependency.
But if you working in that directory/path, i.e.,
C:\Users\William\node_modules\brackets, socket.io will use version 1.1, otherwise for any other directory/path it will use the version 2.2.
I hope it clears your doubt.

Why my Nodejs gets automatically upgraded to the latest version of Nodejs after sometime?

I have a previous version of node installed but after few days it gets automatically updated to the latest version. I do not want it to upgrade itself to a newer version.
You need to specify the exact node version in your package.json file.
A bit of background, from the NPM documentation:
It's important to communicate the extent of changes in a new release of code, because sometimes updates can break code that a package needs (called dependencies).Semantic versioning (semver) is a standard that was designed to solve this problem.
From your terminal, type node --version; you will get a number formatted as X.X.X
Open your package.json file and remove any ~ or ^ signs from the node version you want to use so that it won't update to any minor or batch changes.
enter npm install in your terminal again and you are done.

"no template named 'WeakCallbackData' in namespace 'v8'" error when installing npm packages

Some packages that depend on https://www.npmjs.com/package/fibers fail to install with error message above. Particularly it is iron-meteor.
Homepage of the fibers states:
meteor users please read this
If you're trying to get meteor running and you ended up at this page you're probably doing something wrong. Please uninstall all versions of NodeJS and Meteor, then start over. See meteor#5124 for more information."
But it does not seem to be very helpful.
One guy recommends to downgrade node.js here https://github.com/NativeScript/NativeScript/issues/2991
It helps indeed, but it is kind of hack, right?
Node version affected: v7.2.0
Node v6.9.2 works well.
WeakCallbackData was removed from the V8 API earlier this year. Since this change has landed in Node 7, packages that rely on v8::WeakCallbackData don't work anymore. You need to downgrade Node or wait until Meteor supports Node 7, i.e., uses a newer node-fibers version.

When using nvm to manage your node versions, should you point webstorms node interpreter to it?

When you switch to the nvm to manage your node versions, should you point your node interpreter to that one?
ie from /usr/bin/node to the ~/.nvm/v.xxx one
I ask because I'm running into some issues with webstorm when trying to debug node stuff now.
Best thing I've found so far is to add each version to Default 'Node.js and NPM' Settings (rather than in individual Project settings). Then when creating new projects, or updating existing ones, you can select that version from the dropdown instead of having to recreate it for each project.
But it would be nice if the NodeJS Plugin would look for nvm and integrate with it. Or if nvm would create symlink for /usr/bin/node and update that when you change the version.
Yes, you need to explicitly set the Node Interpreter to the version you'd like to use
You should not need to do that, it seems it was a bug that was identified and reported. A fix will be released in the coming 2016.1.3 EAP version of WebStorm.
https://youtrack.jetbrains.com/issue/WEB-21558
As #zenw0lf stated above, WS does now look for installed node versions under .nvm but since .nvm does not yet add an alias for the active version of node, the specified value is fragile as it's version-based.
I've attempted to resurrect the appropriate issue in NVM to alleviate this. Please follow that for updates.

Resources