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.

Installation error: "babel: not found"

See original GitHub issue
$ sudo yarn global add solgraph

............

[4/4] Building fresh packages...           
[1/5] ⠁ node-sass: node-sass build Binary found at /usr/local/share/.config/yarn/global/node_modules/node-sass/vendor/linux-x64-59/binding.node                             
[-/5] ⠁ waiting...                         
[3/5] ⠁ uws                                
[-/5] ⠁ waiting...                         
error /usr/local/share/.config/yarn/global/node_modules/solgraph: Command failed.     
Exit code: 1                               
Command: npm run build                     
Arguments:                                 
Directory: /usr/local/share/.config/yarn/global/node_modules/solgraph                 
Output:                                    
> solgraph@0.3.0 build /usr/local/share/.config/yarn/global/node_modules/solgraph     
> babel -d dist src                        

sh: 1: babel: not found                    
npm ERR! file sh                           
npm ERR! code ELIFECYCLE                   
npm ERR! errno ENOENT                      
npm ERR! syscall spawn                     
npm ERR! solgraph@0.3.0 build: `babel -d dist src`                                    
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the solgraph@0.3.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I tried to remedy this with sudo yarn global add babel, but when I ran sudo yarn global add solgraph next, it complained:

[4/4] Building fresh packages...
[1/5] ⠈ node-sass: node-sass build Binary found at /usr/local/share/.config/yarn/global/node_modules/node-sass/vendor/linux-x64-59/binding.node
[-/5] ⠈ waiting...
[3/5] ⠈ uws
[-/5] ⠈ waiting...
error /usr/local/share/.config/yarn/global/node_modules/solgraph: Command failed.
Exit code: 1
Command: npm run build
Arguments: 
Directory: /usr/local/share/.config/yarn/global/node_modules/solgraph
Output:
> solgraph@0.3.0 build /usr/local/share/.config/yarn/global/node_modules/solgraph
> babel -d dist src

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 --save-dev babel-cli

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

I then tried:

sudo yarn global remove babel && \
sudo yarn global add -D babel && \
sudo yarn global add solgraph

But received the initial error again: sh: 1: babel: not found

The same issue occurs with npm.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
weijiekohcommented, Jun 29, 2018

I can test this with a fresh Ubuntu installation in a VM.

How should I go about doing this? I don’t think cloning your repo and running npm install will reproduce the error, as I’ve tried that with both jpantunes’s decentralised branch and raineorshine’s master branch, without encountering the error.

0reactions
raineorshinecommented, Jun 29, 2018

#29 merged and published in v0.3.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm - Babel command not found - Stack Overflow
There are two problems here. First, you need a package.json file. Telling npm to install without one will throw the npm WARN enoent...
Read more >
babel: command not found error [Solved] | bobbyhadz
Use npx to solve the error "babel: command not found", e.g. npx --package @babel/cli babel --version or install the package globally by running...
Read more >
command not found". Babel is not available when installed ...
I want to compile React components. I follow this setup https://babeljs.io/docs/setup/#babel_cli. It says: While you can install Babel CLI globally on your ...
Read more >
Deployment failure: babel command not found - Support
Deployment fails and it says babel command not found. Though I have it as dev-dependency. 5:05:56 PM: Build ready to start 5:05:58 PM: ......
Read more >
@babel/core - npm
Start using @babel/core in your project by running `npm i @babel/core`. There are 20023 other projects in the npm registry using @babel/core.
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