question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11: SCRIPT1003: Expected ':'

See original GitHub issue

Hello,

I’m having a few issues getting this component working in my app. Historically, I’ve never been able to include it via NPM (I’ve had to download the .zip release and import via the source files). It would seem as of version 1.7.0, I can’t do either.

My app is based on Laravel + Vue and I am using Laravel Mix 4.0.0.

Here are my issues:

Installing via npm (npm install vuejs-datatable), I import the component:

import DatatableFactory from 'vuejs-datatable'

Then add it to Vue:

Vue.use(DatatableFactory);

By default, I get a “Cannot read property ‘use’ of undefined” error in Google Chrome. I also get this if I import vuejs-datatable from the source files (i.e.: import DatatableFactory from './vendor/vue-datatable').

Per issue #50, I added the following to my webpack.mix.js file:

mix.webpackConfig({
    resolve: {
        alias: {
            'vuejs-datatable': 'vuejs-datatable/dist/vuejs-datatable.esm.js'
        }
    }
})

After recompiling the JavaScript, everything works in Google Chrome. However, Internet Explorer throws the following error:

SCRIPT1003: Expected ':'
File: app.js, Line: 118095, Column: 719

Here’s a screenshot of that line #:

screen shot 2019-01-08 at 2 26 06 pm

Any thoughts if I’m doing something wrong, or if it’s a bug?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
SerGioPicconticommented, Jan 24, 2019

Try import without vendor folder:

import DatatableFactory from ‘vuejs-datatable/dist/vuejs-datatable.esm.js’; Vue.use(DatatableFactory);

0reactions
GerkinDevcommented, Feb 15, 2019

BTW, duplicate of #57

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaScript Ajax SCRIPT1003: Expected ':' in IE 11
This code works in Chrome but in IE 11 returns the error SCRIPT1003: Expected ':' on line 5. I'd really appreciate any help....
Read more >
[SOLVED] IE11 + SCRIPT1003: Expected ':' error - Vue Forum
Hi guys! I need help with a simple vue script, that breaks on IE console error: SCRIPT1003: Expected ':' ui.js (8,12). ui.js here:...
Read more >
Error in ie 11 SCRIPT1003: Expected ':' · Issue #439
I believe I have a fix for this. Here's my config using Webpack 4 and Babel 7. You'll have to adjust for earlier...
Read more >
Kibana 7.11.1 - ie11 - bootstrap error (html5)
Everything works fine on chrome and we get errors on ie11. SCRIPT1003: Expected ':' File: bootstrap.js, Line: 18, Column: 20 When I check ......
Read more >
jQuery Error in IE11 [#3160010]
... settings) { This is causing the following error in Internet Explorer 11: SCRIPT1003: Expected ':' I was able to eliminate the error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found