Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MainContainer module parse failed - currently no loaders are configured #111

Open
j-lea opened this issue May 15, 2020 · 1 comment
Open

Comments

@j-lea
Copy link

j-lea commented May 15, 2020

Hi folks,

We are looking to use clarity-react in a simple typescript create-react-app project.
We have followed the instructions in the README (including getting the clarity-react node module from Github instead of npm - issue #72 ), however are getting the following error:

./node_modules/@dell/clarity-react/src/layout/main-container/MainContainer.tsx 24:7

Module parse failed: Unexpected token (24:7)


You may need an appropriate loader to handle this file type, currently no loaders 
are configured to process this file. 

See https://webpack.js.org/concepts#loaders

|  * @param {dataqa} for Quality Engineering

|  */

> export type MainContainerProps = {

|     actions?: React.ReactNode;

|     title: string;

We weren't expecting to configure a loader for something in our node modules, is there something we are missing?

Note: Our App.tsx and index.tsx are copied from the README.md example and the rest is a vanilla create-react-app project to test this out

Thanks in advance!

cc @gmrodgers

@AICrafterZheng
Copy link

Hi j-lea,

You will be able to load components from dist after executing make in folder node_modules/@dell/clarity-react.
e.g.
import {MainContainer} from "@dell/clarity-react/dist/layout/main-container/MainContainer"
I got the idea from #82

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants