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.

Uncaught SyntaxError: Invalid or unexpected token

See original GitHub issue

image

my webpack config

new ModuleFederationPlugin({
      name: "ahas_sentinel",
      library: { type: "var", name: "ahas_sentinel" },
      filename: "remoteEntry.js",
      remotes: {
        ahas_switch: `ahas_switch@${config.output.publicPath}remoteEntry.js`,
      },
      exposes: {
        "./routes": "./routes.tsx",
      },
      shared: {
        ...deps,
      },
 })
  • webpack-5

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
alexander-akaitcommented, Oct 5, 2021

JSON.stringify(‘app2@http://example.com/’)

2reactions
hypeJunctioncommented, Jan 24, 2021

This seems to only happen with { library: { type: 'var', name: 'name' } }. Not sure what the underlying reason is.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Unexpected token - JavaScript - MDN Web Docs
The JavaScript exceptions "unexpected token" occur when a specific language construct was expected, but something else was provided.
Read more >
Uncaught SyntaxError: Invalid or unexpected token
@Iman's backtick(`) solution worked great in the modern browsers but caused an invalid character error in Internet Explorer. I had to use the...
Read more >
Have a JavaScript Unexpected Token Error? Check Your Syntax
The JavaScript's parser expects tokens and symbols in a particular order, with relevant values or variables in between. Often, an Unexpected ...
Read more >
JavaScript SyntaxError: Invalid or unexpected token ... - IBM
Given that you say the same exact task, if you re-issue it with the same exact data will then work, this feels like...
Read more >
Uncaught SyntaxError: Invalid or unexpected token
[This thread is closed.] Console is showing this error after turning on minify css: Uncaught SyntaxError: Invalid or unexpected token Looking at the…...
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