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.

Webpack Syntax Error

See original GitHub issue

Hi,

I am facing problem using multiselect beta version with webpack. More information:

ERROR in ./~/vue-multiselect/lib/vue-multiselect.min.js
Module build failed: SyntaxError: 'with' in strict mode (1:29119)
    at Parser.pp$4.raise (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:2221:15)
    at Parser.pp$1.parseWithStatement (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:932:27)
    at Parser.pp$1.parseStatement (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:708:32)
    at Parser.pp$1.parseBlock (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:981:25)
    at Parser.pp$3.parseFunctionBody (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:2105:24)
    at Parser.pp$1.parseFunction (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1065:10)
    at Parser.pp$3.parseExprAtom (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1810:19)
    at Parser.parseExprAtom (/Users/ralee/Public/projects/helixtap/node_modules/buble/dist/buble.umd.js:656:26)
    at Parser.pp$3.parseExprSubscripts (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1715:21)
    at Parser.pp$3.parseMaybeUnary (/Users/ralee/Public/projects/helixtap/node_modules/buble/node_modules/acorn/dist/acorn.js:1692:19)
 @ ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/settings/account.vue 129:0-41
 @ ./resources/assets/js/components/settings/account.vue
 @ ./~/buble-loader!./~/vue-loader/lib/selector.js?type=script&index=0!./resources/assets/js/components/setting-base.vue
 @ ./resources/assets/js/components/setting-base.vue
 @ ./resources/assets/js/setting.js

Is there a work around for this? Please advice.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:23 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
shentaocommented, Oct 18, 2016

@talvbansal Not yet. Please use the workaround: import Multiselect from 'vue-multiselect/lib/Multiselect.vue'

1reaction
LinusBorgcommented, Oct 31, 2016

Vue uses with for its own render functions. It was a design decision.

If that turns out to be a problem with e.g. ES6 modules in webpack 2, we might have to find some solution for this part of the codebase.

But as I’m not sure yet weithet this is is the case, please continue to investigate in your own as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack Build SyntaxError: Unexpected token - Stack Overflow
Webpack Build SyntaxError: Unexpected token ) ; import React from ; function App ; <div> <h2>Welcome to My new React App</h2> <h3>Date :...
Read more >
"SyntaxError: Unexpected token ." in webpack script · Issue #64
Hello, I have the following configuration: node 10.16.0 electron 3.0.2 webpack 4.20.2 webpack-node-externals 1.7.2 When adding the line ...
Read more >
Syntax Error: Unexpected token while bundling with webpack
Note: The error happens when K6 is run, and not during the build process. I have tinkered around using some information from external...
Read more >
Webpack lesson - Uncaught SyntaxError: Unexpected token ...
Why do I get "Uncaught SyntaxError: Unexpected token import"? Compiling works ok. I am doing this lessons https://laracasts.com/series/webpack-for-everyone/ ...
Read more >
Unhandled Runtime Error SyntaxError: Unexpected token ...
`1 of 1 unhandled error Unhandled Runtime Error SyntaxError: ... /app-node/.next/static/chunks/webpack.js (37:37) eval [native code] .
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