Questions tagged [babel-cli]
61 questions
0
votes
1 answer
My webpack babel loader is not compiling my javascript code
I have been learning webpack and babel...
All things are working fine but my webpack config is not working as it should, I think something I missed here.
Here are my webpack.config.js code
const path = require('path');
module.export = {
…

Jabid Hasan
- 19
- 1
- 7
0
votes
1 answer
Babel --out-file in a child folder
I am trying to compile jsx with babel. I can do it but I want to set --out-file in a child dir. There is I want to do:
website
src
file_will_be_compiled.js
file_was_compiled.js
package.json
The script I am running on the shell :
babel…

Yusuf Ziya
- 107
- 7
0
votes
1 answer
PM2 Interpretor not using babel for my dev environment for react app
I'm trying to set up pm2 for my development server,and it seems like its launched but upon going to my site in port 3000 it says that it can't be reached refuses to connect. I checked my pm2 logs and it says
SyntaxError:…

scotth527
- 77
- 2
- 10
0
votes
1 answer
How do you update a dependency inside Babel-CLI?
I'm having trouble with npm security reporting a low level vulnerability within the babel-cli package - at version 6.26.0.
Everything else works just fine, however this requires a manual review. The package in babel-cli is "braces", and so far I…

Merlin
- 929
- 12
- 33
0
votes
1 answer
How to specify a pragma when using babel-cli?
For transform-react-jsx I have to specify a pragma but I want to only use babel-cli. Is that possible ?

Robert C. Holland
- 1,651
- 4
- 24
- 57
0
votes
1 answer
Unable to install Babel locally in a project
I'm following the steps from here https://babeljs.io/setup#installation.
I create a package.json file and then run
npm install --save-dev babel-cli
I get the error:
npm ERR! Darwin 17.7.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm"…
user7478189
0
votes
1 answer
File compiled using babel-cli throws an error
I'm compiling my client side using webpack with env, stage-0 and react presets. It was working just fine but now I started working on server-side rendering, so I had to use some es6 and jsx syntax in my server file. I'm compiling it using exact same…

Kreha6
- 81
- 8
0
votes
1 answer
Can babel CLI print debugging info?
I'd love to know some stats like the before/after file size. Any way to enable this with babel CLI?

gwintrob
- 3,253
- 2
- 18
- 14
0
votes
0 answers
Cannot render my react app server side
I am trying to render a basic react component via node js .
Unfortunately i got some errors. I think this is related to es6.
The problem is i already wrote a lot of code in es6 and now i want to render it in node js. I can't rewrite my entire app,…

Jack
- 157
- 1
- 3
- 8
0
votes
1 answer
Error when trying to compile es6 code to es5 using babel-cli
I'm getting an error saying "unexpected token export" when trying to compile some es6 code using "babel-cli" with the presets "es2015" and "stage-2". I'm trying to export a function from the "test.js" file and import it in the "index.js" file but…

2K01B5
- 1,011
- 1
- 10
- 23
0
votes
1 answer
How to setup babel-cli to run react-native ES6 JavaScript code on command line?
My goal is to run ES6 JavaScript code containing console.log statements on the command line to help debug code before integrating with my React Native app. This code contains only JS functions.
This is what I tried:
Install babel-cli
npm install…

Ed of the Mountain
- 5,219
- 4
- 46
- 54
0
votes
0 answers
Path issue while Configuring babel-cli
I recently started working with ReactJS. So I was following a tutorial which shows how to configure babel-cli. So with it, I've installed all necessary packages including liter-server. I understood and implemented pretty much everything same but,…

Kishore Kumar Korada
- 1,204
- 6
- 22
- 47
0
votes
1 answer
Why do I get a `Unknown option: .babelrc.presets` error when trying to transpile my code using babel-cli v6?
I have this in my package.json:
"devDependencies": {
...
"babel-cli": "^6.8.0",
"babel-core": "^6.8.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-react": "^6.5.0",
"babel-preset-stage-2": "^6.5.0",
...
}
And this in my…

Felipe Brahm
- 3,162
- 1
- 28
- 42
-1
votes
2 answers
Getting "npm start" error when deploy Node JS app to Heroku server
I'm getting this error when i deploy my NodeJS app to Heroku server.
2019-08-27T05:54:03.597197+00:00 heroku[web.1]: State changed from starting to crashed
2019-08-27T05:54:03.569746+00:00 heroku[web.1]: Process exited with status…

quan_bui
- 69
- 1
- 3
- 8
-2
votes
1 answer
How to execute Babel-node from GIT bash without typing entire link to node_modules
The goal is to execute babel-node server.js from GIT bash without typing entire link for babel-node.
.bash_profile with the following:
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
.bashrc with the following:
export PATH=$(npm bin):$PATH
$…