How difficult is the migration from Node.js version 8.x to 10.x?
Node.js version 8 ends its Active LTS status as of January 2019. This means that in January, version 8 then enters a 12-month period of only bug fixes and security patches before sunsetting at end of 2019. As such, developers should be actively moving their apps to version 10.
Skipping two versions of any software is always a little scary. Luckily the Node.js API is relatively stable and, depending on the complexity of your application, the migration should be fairly painless.
In my experience, you’ll run into two main challenges as you’re upgrading:
First, the Buffer constructor has been deprecated. Buffer usage isn’t uncommon, so you may find some places that you’ll need to update how you’re creating new Buffers. Check out the documentation for Node.js 10.x.
Second, dependencies you use in your Node.js projects will likely be doing more low-level stuff than your application code, so you will probably have to go through a dependency upgrade sprint to get everything to 10.x compatible versions. This will take the most time during your migration. Dependencies can be hairy or easy; on the bright side, 10.x has been released for almost a year at this point, so all of your dependencies should be compatible. If a dependency hasn’t been upgraded to work with 10.x, then I’d suggest dropping it since development on that dependency looks to have stopped.
Which IDE (Integrated Development Environment) is best for Node.js development?
Even though you don’t need anything more than a text editor, it’s really nice to have something that assists you with development. I wouldn’t call these IDEs, as they’re more like beefed-up code editors.
Atom is a close second. Like Visual Studio Code, it’s a free code editor with a healthy plugin ecosystem built on the Electron framework. Atom is developed by GitHub and is also open source and free. I used to use Atom a lot, but in my experience, I’ve found Visual Studio Code to be a little snappier and use less memory than Atom. It will be interesting to see the future of both projects since Microsoft acquired GitHub last year and now essentially owns both competing products.
Is there a better installer for Node.js than Homebrew?
Homebrew (a package installer application for MacOS) is a great way to install Node.js; I used it for many years. When I started doing more Node.js development at work, however, it was no longer sufficiently robust. The key thing I needed was to be able to switch versions easily, since I had to support applications that were running on a variety of Node.js versions.
I started using a Node.js version managing application called nvm. An acronym for “Node Version Manager”, nvm allows you to install many different versions of Node.js, npm and global dependencies and switch between them easily. Since new minor versions of Node.js are released at least monthly, it’s nice to be able to upgrade quickly and easily with nvm.
Windows users aren’t out of luck here. There is a similar Node.js version manager for Windows called nvm-windows. I haven’t used it yet, but it seems to promise the same experience and functionality as nvm.
Do you need to be a seasoned full stack developer to work with Node.js?
The quick answer is no, you don’t.
The Node.js ecosystem can initially seem a little obtuse from the outside. Many front end developers get a soft welcome to Node.js when it’s needed for dependencies and frameworks, but developers just starting out might not know where to start.
Luckily, the community around Node.js is extremely active and motivated. There are a lot of resources out there for developers to get started with Node.js easily no matter their experience level.
If you’re coming at Node.js with deep experience in an existing development language, I recommend using what you’ve learned as you get into Node.js. I have a pretty strong background in Java, and I’ve found that approaching Node.js applications with the best practices from learning Java development have actually improved my applications.
Pluralsight has a lot of great Node.js courses for developers. There’s also a free command line tutorial application for learning all sorts of things in Node.js called NodeSchool.
What are the new features in Node.js version 11?
Node.js version 11 was released in October 2018 and represents the newest non-LTS major version of Node.js. These non-LTS versions won’t be supported like LTS versions, but they give the Node.js development community an opportunity to work on new features and performance improvements. (I like to add the caveat to discussions of non-LTS Node.js versions that they will only be supported for around six months, and therefore shouldn’t be used for production systems.)
Node.js version 11 doesn’t bring a lot of new API changes—mostly bug fixes and code improvements. (The full changelog can be found here, but be warned it’s pretty dense.) However, there are two non-Node.js code additions to Node.js in version 11 that I think are particularly cool:
New V8 version
Node.js 11 ships with version 7 of the V8 engine. This brings a lot of significant performance improvements. The biggest new feature here is live code-coverage. This means that by using a flag, Node.js can output what lines were executed as your application runs (using this new V8 feature). This removes the need to use a coverage reporter that transpiles your code beforehand and improves testing speed. This feature is still really new, but you can try it out using the c8 package.
New npm version
Node.js 11 ships with version 6.x of npm. This new version of npm has some really cool new additions, such as the npm audit feature. By running ‘npm audit’ you will be able to view which dependencies have reported security issues and can upgrade them easily. This new version of npm is also way faster than the previous one. Adding to the speed feature is another new npm command: ‘npm ci’. This is a new command to install dependencies for your continuous integration servers. It’ll install everything for your project significantly faster than a normal ‘npm install.’
Download the new version of Node.js here and give it a shot. And learn more about the latest developments with the full webinar on Node.js trends.
5 keys to successful organizational design
How do you create an organization that is nimble, flexible and takes a fresh view of team structure? These are the keys to creating and maintaining a successful business that will last the test of time.Read more
Why your best tech talent quits
Your best developers and IT pros receive recruiting offers in their InMail and inboxes daily. Because the competition for the top tech talent is so fierce, how do you keep your best employees in house?Read more
Technology in 2025: Prepare your workforce
The key to surviving this new industrial revolution is leading it. That requires two key elements of agile businesses: awareness of disruptive technology and a plan to develop talent that can make the most of it.Read more