Code Monkey home page Code Monkey logo

Comments (9)

Borewit avatar Borewit commented on May 25, 2024

Hello @ileose,

I don't think this is directly related to music-metadata-browser.

What version of Internet Explorer are you using?
music-metadata-browser NPM is written in JavaScript version ES2017 (ES8).

WebPack may transpile it to a different version, maybe not. That line looks like initialization code generated by WebPack. Is the issue gone if you exclude music-metadata-browser?

from music-metadata-browser.

ileose avatar ileose commented on May 25, 2024

I'm using i.e 11.
And use 'babel/preset-env' and 'babel/preset-react' to use the latest JavaScript in project.
This issue is gone when I exclude music-metadata-browser..

from music-metadata-browser.

Borewit avatar Borewit commented on May 25, 2024

Using latest and IE11 is a bit of contradicting combination.

IE11 probably is not able to process to JavaScript, caused by unknown syntax.
Maybe experiment a bit with the generated JavaScript code, format it nicely so you understand what part of the code, IE11 does not understand.

You may get it to work if you ensure Babel is transpiling to ES5.

from music-metadata-browser.

ileose avatar ileose commented on May 25, 2024

Babel is used to transpile them to ES5 for using latest and i.e 11.
In other packages that I use, Babel works with them well..
Is there anything I can do?

from music-metadata-browser.

Borewit avatar Borewit commented on May 25, 2024

That is weird.

My code is written TypeScript, and transpiled to ES2017 (ES8), should be very consistent..

There are a few things you can do:

  • Make sure IE is not running in backward compatibility mode, ensure is is using IE 11 engine.
  • As I suggested before, break that 16509 line in multiple lines so you know narrow down what is causing the SCRIPT1004: Expected ';' error
  • Try enable IE11 poly-fills, maybe this can help you angular/angular-cli#7776
  • If you start pulling your hair out, you can transpile music-metadata-browser directly to ES5:
    "target": "ES2017",
    , use something like yarn link to import you local modified module
  • I can have a look, if I can find the code somewhere

from music-metadata-browser.

Borewit avatar Borewit commented on May 25, 2024

Maybe set IE11 as explicit target in Babel: .https://babeljs.io/docs/en/babel-preset-env#targets

from music-metadata-browser.

Borewit avatar Borewit commented on May 25, 2024

Disable esmodules: https://babeljs.io/docs/en/babel-preset-env#targetsesmodules

from music-metadata-browser.

ileose avatar ileose commented on May 25, 2024

After all, I couldn't find a solution.
Sorry, I think I should change it to something else..

from music-metadata-browser.

olyop avatar olyop commented on May 25, 2024

I'm getting this issue too on the latest version of music-metadata-browser, Chrome, and Firefox.

Uncaught SyntaxError: Unexpected token ':'

I get this error in the browser console when using webpack-dev-server and when I try build the project using webpack and ts-loader (no babel).

When looking through the compiled file, the error occurs in the file: ./node_modules/node-libs-browser/node_modules/util/util.js

I can't seem to find any issues like this to the util and node-libs-browser projects.

Does anyone have any ideas?

from music-metadata-browser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.