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

build fails: this language feature is only supported in es6 mode #81

Open
maiermic opened this issue Nov 24, 2022 · 0 comments
Open

build fails: this language feature is only supported in es6 mode #81

maiermic opened this issue Nov 24, 2022 · 0 comments

Comments

@maiermic
Copy link

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


> [email protected] 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant