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 "Unexpected Token" error in Create React App and other webpack based libraries

See original GitHub issue

I’m trying to use Grid Engine in a React app and am running into a problem getting it to build. At this point, I’m unable to even import GridEngine. without an “Unexpected Token” error.

I’ve been able to replicate this error using Create React App, Gatsby, Storybook, as well as code sandbox. Is this a known error and the library is simply not compatible with these environments, or am I missing something from the docs?

Minimal Create React App repo demonstrating problem - https://github.com/mikedane/grid-engine-bug-demo Code Sandbox repo with similar error - https://codesandbox.io/s/cool-worker-q0cgv?file=/src/App.js

Any help would be appreciated!

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
mikedanecommented, May 5, 2021

Looks like the patch fixed it! Can confirm it’s working now. Thanks for the quick response, loving this library!

2reactions
awweathercommented, May 6, 2021

@Annoraaq It’s fixed! thanks for the quick reply

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix the error, "Unexpected token (1:61)" in React?
Update - I went into the package.json and changed the react-scripts to 4.0.1 and re-ran npm install and it fixed the issue.
Read more >
Unexpected token (7:2) You may need an appropriate loader ...
SyntaxError: Unexpected token (7:2) means there is a syntax error on line 7, column 2 in d:\src\react-my-create-react-app-created\src\index.js .
Read more >
How To Fix Unexpected Token Error for NPM Package in react ...
Are you getting this error with react -leaflet or other packages. If you are then it's most likely related to babel and there...
Read more >
babel-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >
How to add React Native Web to an existing ... - Aryan Goharzad
This post covers the most customizable method of adding web support to a plain React Native app using webpack and react-native-web .
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