Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

You may need an appropriate loader to handle this file type. #1196

Closed
viperfx opened this issue Oct 31, 2018 · 4 comments
Closed

You may need an appropriate loader to handle this file type. #1196

viperfx opened this issue Oct 31, 2018 · 4 comments
Labels

Comments

@viperfx
Copy link

viperfx commented Oct 31, 2018

This is the message I get when trying to build a js file, thats an entry point to a react app.

$ neutrino build
✖ Building project failed
./user-settings/index.js
Module parse failed: Unexpected token (15:4)
You may need an appropriate loader to handle this file type.
|
| const load = () => render((
|     <Provider store={store}>
|         <App />
|     </Provider>
 @ multi ./user-settings/index.js
error Command failed with exit code 1.

@edmorley
Copy link
Member

edmorley commented Nov 2, 2018

Hi!

You've deleted the issue template that asked for additional information.
Please could you add that information?

@constgen
Copy link
Contributor

constgen commented Nov 2, 2018

Probably this is because you wrote JSX in JS file. Rename the extension: index.jsx

@edmorley
Copy link
Member

edmorley commented Nov 5, 2018

Probably this is because you wrote JSX in JS file. Rename the extension: index.jsx

When using @neutrinojs/react, JSX can be written in both .jsx and .js files (it's only ESLint rules from the AirBnb preset that would display a preference), so that won't be the reason.

More likely is that either:
(a) the wrong Neutrino preset is being used eg web instead of react
(b) there is a typo in their index.js that we can't see from the excerpt above

Either way we need more information first :-)

@edmorley
Copy link
Member

Closing since the issue was incomplete. Happy to reopen if more information is provided :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants