Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error when compiling #171

Closed
imCaseSensitive opened this issue May 19, 2021 · 4 comments
Closed

Error when compiling #171

imCaseSensitive opened this issue May 19, 2021 · 4 comments

Comments

@imCaseSensitive
Copy link

I'm developing on React with Typescript and attempting to use react-md-editor in my project.
However, when I compile the following errors appear. I noticed another issue here that appears to deal with importing CSS from within node modules. If this is related, please point me in that direction, otherwise any help would be appreciated!

ERROR in ../node_modules/@uiw/react-md-editor/lib/esm/index.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .w-md-editor {
|   color: #24292e;
|   text-align: left;
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js 12:0-21
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-md-editor/lib/esm/components/TextArea/index.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .w-md-editor-aree {
|   overflow: auto;
|   border-radius: 5px;
 @ ../node_modules/@uiw/react-md-editor/lib/esm/components/TextArea/index.js 4:0-21
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-md-editor/lib/esm/components/DragBar/index.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .w-md-editor-bar {
|   position: absolute;
|   cursor: s-resize;
 @ ../node_modules/@uiw/react-md-editor/lib/esm/components/DragBar/index.js 2:0-21
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-md-editor/lib/esm/components/Toolbar/index.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .w-md-editor-toolbar {
|   border-bottom: 1px solid #dfdfe0;
|   background-color: #fbfbfb;
 @ ../node_modules/@uiw/react-md-editor/lib/esm/components/Toolbar/index.js 6:0-21
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-md-editor/lib/esm/components/Toolbar/Child.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .w-md-editor-toolbar-child {
|   position: absolute;
|   border-radius: 3px;
 @ ../node_modules/@uiw/react-md-editor/lib/esm/components/Toolbar/Child.js 3:0-21
 @ ../node_modules/@uiw/react-md-editor/lib/esm/components/Toolbar/index.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-markdown-preview/lib/esm/styles/markdown.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .wmde-markdown {
|   font-size: 16px;
|   line-height: 1.5;
 @ ../node_modules/@uiw/react-markdown-preview/lib/esm/index.js 13:0-31
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx

ERROR in ../node_modules/@uiw/react-markdown-preview/lib/esm/styles/markdowncolor.css 1:0
Module parse failed: Unexpected token (1:0)
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
> .wmde-markdown-color .token.tag .attr-value {
|   color: #032f62;
| }
 @ ../node_modules/@uiw/react-markdown-preview/lib/esm/index.js 14:0-36
 @ ../node_modules/@uiw/react-md-editor/lib/esm/Editor.js
 @ ../node_modules/@uiw/react-md-editor/lib/esm/index.js
 @ ./common/components/Markdown.tsx
 @ ./mypage/components/NoticeAccordion.tsx
 @ ./mypage/pages/tops/index.tsx
 @ ./mypage/App.tsx
 @ ./mypage/index.tsx
@imCaseSensitive imCaseSensitive changed the title Error on compile Error when compiling May 19, 2021
@jaywcjlove
Copy link
Member

@imCaseSensitive Are you using webpack?

https://codesandbox.io/s/markdown-editor-for-react-izdd6
You can download the sample to test it.

@imCaseSensitive
Copy link
Author

@jaywcljlove
Yes, i'm using webpack.

@jaywcjlove
Copy link
Member

You need to configure to load css in node_modules

@imCaseSensitive
Copy link
Author

You're right! Thank you!

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

No branches or pull requests

2 participants