[14:53:55] ReferenceError: [BABEL]
/home/pravi/forge/debian/git/js-team/node-babel/packages/babel-parser/src/x.js:
Unknown option: base.envName. Check out
<http://babeljs.io/docs/usage/options/> for more information about options.

The reason for this error and other errors is that this version uses multiple 
Babel features introduced in Babel 7, such as:
* envName option [1]
* babel.config.js file [2]
* Numeric separator [3]

For these reasons, it doesn't seem possible to build Babel 7.4.5 using Babel 6. 
I see two possible ways to solve this:
1. Bootstrap Babel manually, that is, build it locally using Babel installed 
from NPM and upload the resulting binary packages.
2. First package an older version of Babel, such as 7.0.0, then use it to build 
the current version.

Some other notes:
* The version being packaged is 7.4.5, but the latest stable version is already 
7.6.0.
* During build, it is better to set NODE_ENV=production, because otherwise it 
will build for the current version of Node, so the resulting code may not run 
on older versions. With NODE_ENV=production, it will build for Node 6.9 and 
later (this is specified in babel.config.js).

[1]: https://babeljs.io/docs/en/options#envname
[2]: https://babeljs.io/docs/en/config-files#root-babelconfigjs-files
[3]: https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator

Reply via email to