0
votes

I am on a mac. I get the attached message when i try to run the command npm install babel: ...

npm WARN deprecated [email protected]: In 6.x, the babel package has been deprecated in favor of babel-cli. Check https://opencollective.com/babel to support the Babel maintainers /Users/samrao └── [email protected]

npm WARN enoent ENOENT: no such file or directory, open '/Users/samrao/package.json' npm WARN samrao No description npm WARN samrao No repository field. npm WARN samrao No README data npm WARN samrao No license field. Sams-MacBook-Air:~ samrao$

1

1 Answers

0
votes

As the warning states the node package module babel has been deprecated, I recommend having a look at this site for more information regarding babel and the documentation you can use to install it: babeljs.

The other errors that you get are because you are not using -g (Global) in the install command for npm so its trying to install the package in the local directory but cannot find package.json file.

Although on the babal installation page it states:

While you can install Babel CLI globally on your machine, it’s much better to install it locally project by project.

There are two primary reasons for this.

  • Different projects on the same machine can depend on different versions of Babel allowing you to update one at a time.

  • It means you do not have an implicit dependency on the environment you are working in. Making your project far more portable and easier to setup.