Node v20.10.0 is not tested against Ember CLI on your platform

81 Views Asked by At

I'm getting an error when I try to init a new ember project.

I just installed ember using this command: npm install -g ember-cli then I ran: ember init to create my project, but it throws the following error:

WARNING: Node v20.10.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js. See https://git.io/v7S5n for details. The ember init command requires a package.json in current folder with name attribute or a specified name via arguments. For more details, use ember help.

enter image description here

Any help you can provide would be appreciated!

2

There are 2 best solutions below

0
BryanH On

There are two issues here, one if them minor and one catastrophic.

The minor issue is the warning about node version. Ember is telling you the version you have hasn't been tested for ember apps, and it is recommending you use the current node version thst is in active long-term support (LTS). The link in the message goes to a page that shows you what version of node you can safely use.

The major issue is that you're missing a package.json file, which describes your project and the libraries it needs. Normally, ember init automatically creates this file.

Some things to check:

  1. You're running ember init in an empty directory
  2. You have the latest version of ember-cli installed
  3. You have the latest Node LTS and npm installed

If all else fails, try running npm init in that same directory (just hit return/enter for any questions it asks) and see if it gives you a meaningful error.

0
Caltor On

You should run ember new to create a new application rather than ember init. This will create a new folder and package.json etc for you.

See https://cli.emberjs.com/release/basic-use/cli-commands/#createanewapp

As for the node compatibility; you can check which versions of node are compatible with the version of ember you have installed at https://github.com/ember-cli/ember-cli/blob/master/docs/node-support.md#node-support (I couldn't find the published docs for this so this is a link to the githib source). Typing ember -v at the command prompt will tell you which version of ember-cli (and node) you have installed in the current folder. If you run that command outside of an Ember project it will tell you what version of ember-cli you have installed globally.