build fails: this language feature is only supported in es6 mode
maiermic opened this issue · 0 comments
maiermic commented
I tried to build for development by running npm run dist
, but I get multiple errors
> npm run dist-dev && java -jar node_modules/google-closure-compiler/compiler.jar --warning_level QUIET --compilation_level SIMPLE_OPTIMIZATIONS --js dist/jschardet.js > dist/jschardet.min.js
> jschardet@3.0.0 dist-dev /Users/maiermic/Repositories/github/aadsm/jschardet
> mkdir -p dist && browserify index.js -s jschardet --detect-globals false -o dist/jschardet.js
dist/jschardet.js:1680: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const codingSM of self._mCodingSM) {
^
dist/jschardet.js:1680: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const codingSM of self._mCodingSM) {
^
dist/jschardet.js:6722: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const supportedCharsetNames = (function() {
^
dist/jschardet.js:6723: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const charsetNames = [];
^
dist/jschardet.js:6724: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of this._mProbers) {
^
dist/jschardet.js:6724: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of this._mProbers) {
^
dist/jschardet.js:7360: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of self._mProbers) {
^
dist/jschardet.js:7360: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of self._mProbers) {
^
dist/jschardet.js:7525: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const supportedEncodings = (function() {
^
dist/jschardet.js:7526: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const BOM_UTF = [
^
dist/jschardet.js:7530: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const probers = [
^
dist/jschardet.js:7536: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const encodings = BOM_UTF.slice(0);
^
dist/jschardet.js:7537: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of probers) {
^
dist/jschardet.js:7537: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const prober of probers) {
^
dist/jschardet.js:7543: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
const supportedEncodingsDenormalized = (function() {
^
dist/jschardet.js:7545: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const encoding of supportedEncodings) {
^
dist/jschardet.js:7545: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const encoding of supportedEncodings) {
^
dist/jschardet.js:7559: ERROR - this language feature is only supported in es6 mode: for-of loop. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const encoding of options.detectEncodings) {
^
dist/jschardet.js:7559: ERROR - this language feature is only supported in es6 mode: const declarations. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
for (const encoding of options.detectEncodings) {
^
dist/jschardet.js:7561: ERROR - this language feature is only supported in es6 mode: template literals. Use --language_in=ECMASCRIPT6 or ECMASCRIPT6_STRICT to enable ES6 features.
throw new Error(`Encoding ${encoding} is not supported. Supported encodings: ${supportedEncodings}.`);
^
20 error(s), 0 warning(s)