question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Node to use LTS, update engine requirement in package.json

See original GitHub issue

Feature Request

Description

It is proposed that instead of locking down to a specific Node version in the .nvmrc, we should be pointing to use the LTS.

As of nvm v0.33.6 nvm supports the use of lts/* for long term support in the .nvmrc config file.

You can reference LTS versions in aliases and .nvmrc files with the notation lts/* for the latest LTS

This way we don’t have to worry about manually updating the Node version and we will always target LTS Node.

# .nvmrc
lts/*

It is proposed to update the engine requirement to use both Node v8.x and v10.x.

The new Node LTS version is 10.x which causes issues with Terra since it’s still on 8.x (now in maintenance).

# package.json
"engines": {
  "node": "^8 || ^10"
}

Additional Context / Screenshots

screen shot 2018-11-13 at 3 02 42 pm screen shot 2018-11-13 at 3 05 16 pm

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bjankordcommented, Nov 14, 2018

lts/carbon sounds fine to me. Does setting ^8.9.2 in the .nvmrc file do the same thing? That caret syntax may be an npm only thing that nvm doesn’t parse.

Edit: Tried running nvm install ^8.9.2 to see if it would install latest 8.x version, didn’t work.

I’m cool with setting lts/carbon in the .nvmrc file and switching it to lts/dubnium when we update to node 10.x along with updating our node engine key in package.json to "node" : ">=8.9.2"

0reactions
dev-cpricecommented, Nov 14, 2018

How about instead of lts/*, we lock it down to 8.x at least? If we do lts/carbon it will pull in all minor & patch versions of 8.x carbon

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can I specify the required Node.js version in package.json?
You can set the engines field in your package.json and set requirements for either node or npm versions or both: "engines" : {...
Read more >
How to define the required Node.js version in package.json?
Step 1: Our first and foremost step should be to choose a project on which we are going to work, for example, I...
Read more >
How to Update Node.js to Latest Version {Linux, Windows ...
Option 1: Update Node.js with NVM (Node Version Manager) · 1. Start by updating the package repository with the command: sudo apt update...
Read more >
How to Easily Update Node.js to the Latest Version
3. Updating using a Node installer on Linux · Go to the official Node.js downloads site, which has different Linux binary packages, and...
Read more >
How to upgrade Node.js and dependencies. Results.
In package.json, Change node version in engines sections. · Update Node.js version any appropriate way. · Try to install dependencies. · Fix all ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found