Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message incorrect for global installation #5228

Closed
JemarJones opened this issue Jan 27, 2017 · 2 comments · Fixed by #5258
Closed

Error message incorrect for global installation #5228

JemarJones opened this issue Jan 27, 2017 · 2 comments · Fixed by #5258
Labels
good first issue Has PR outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@JemarJones
Copy link

JemarJones commented Jan 27, 2017

The cli error message currently says the following:

You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.

    npm uninstall babel
    npm install babel-cli

See http://babeljs.io/docs/usage/cli/ for setup instructions.

But if someone installed the package globally, shouldn't it say:

You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.

    npm uninstall -g babel
    npm install -g babel-cli

See http://babeljs.io/docs/usage/cli/ for setup instructions.

Or perhaps if theres no way to detect how it was installed:

You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.

    npm uninstall [-g] babel
    npm install [-g] babel-cli

See http://babeljs.io/docs/usage/cli/ for setup instructions.
@babel-bot
Copy link
Collaborator

Hey @JemarJones! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.

@xtuc
Copy link
Member

xtuc commented Jan 28, 2017

Thanks for the issue 👍. We can detect if Babel was installed globally.

Related #5091

xtina-starr added a commit to xtina-starr/babel that referenced this issue Feb 2, 2017
loganfsmyth pushed a commit that referenced this issue Feb 6, 2017
#5258)

* checks if babel is installed globally and displays correct cli message - fixes #5228

* recommend local installation and fix lint errors

* uses babel-cli vs babel

* switch back to babel

* use process.cwd() to determine if globally executed

* checks for /node_module/.bin/babel

* compare execPath and module execution path to determine global or local installation

* Move the babel/cli.js into a 'src' so the 'const's are compiled Node < 6.
existentialism pushed a commit that referenced this issue May 19, 2017
#5258)

* checks if babel is installed globally and displays correct cli message - fixes #5228

* recommend local installation and fix lint errors

* uses babel-cli vs babel

* switch back to babel

* use process.cwd() to determine if globally executed

* checks for /node_module/.bin/babel

* compare execPath and module execution path to determine global or local installation

* Move the babel/cli.js into a 'src' so the 'const's are compiled Node < 6.
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Has PR outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants