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.

Failed to compile

See original GitHub issue
./node_modules/react-select/src/Select.js
SyntaxError: /Users/apple/Workspace/dashboard/node_modules/react-select/src/Select.js: Unexpected token, expected "," (3:32)

  1 | // @flow
  2 | 
> 3 | import React, { Component, type ElementRef, type Node } from 'react';
    |                                 ^
  4 | import memoizeOne from 'memoize-one';
  5 | import { MenuPlacer } from './components/Menu';
  6 | import isEqual from './internal/react-fast-compare';

Issue Analytics

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

github_iconTop GitHub Comments

26reactions
cototalcommented, May 9, 2020

I got this error when I let VS Code auto-generate the import for me. I didn’t realize that it went into the src directory for the import.

import Select from "react-select/src/Select";

Once I set it to the intended import Select from "react-select", it worked fine.

1reaction
elisabetta-pcommented, Jan 27, 2021

@Methuselah96 Thank you for your quick response! There surely was something wrong with my code, since the error went away after I rewrote it (but no I don’t use Flow). Thanks tho!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack failed to compile - Stack Overflow
1 Answer 1 · inside index.js you are importing a css file and webpack is unable to handle it, this is what the...
Read more >
Why my React App Failed To Compile - Timonwa's Notes
Bugs and Errors will come in different shapes and sizes, styles and formats you never expect, causing your react app not to compile....
Read more >
Failed to compile error when running on dev server locally ...
After freshly run create-react-app demo cd ./demo npm start Then modify App.css. Console shows Failed to compile. Error in .
Read more >
Failed to compile. Module not found: Error: - Support
Having this error building a react (typescript) app. The error begins at timestamp 5:09:47 PM 5:09:05 PM: Build ready to start 5:09:07 PM: ......
Read more >
[XSIM 43-3410] Failed to compile one of the generated C files.
ERROR: [XSIM 43-3410] Failed to compile one of the generated C files. Hello,. I just tried to run a simple simulation but it...
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