hubgit / react-prosemirror

A React component for ProseMirror
https://ow1qi.csb.app/
MIT License
248 stars 51 forks source link

Prosemirror Global CSS cannot be imported from within node_modules #38

Open bapinmalakar opened 3 years ago

bapinmalakar commented 3 years ago

I am getting following error, not able to build my project

error - ./node_modules/@aeaton/prosemirror-placeholder/style/placeholder.css Global CSS cannot be imported from within node_modules. Read more: https://nextjs.org/docs/messages/css-npm Location: node_modules/@aeaton/prosemirror-placeholder/placeholder.js /Users/biplab/Desktop/H2M/h2m-landing/node_modules/@aeaton/react-prosemirror/index.js:1 export * from './ChangeHandler'; ^^^^^^

SyntaxError: Unexpected token 'export'

"@aeaton/react-prosemirror": "^2.0.3", "@aeaton/react-prosemirror-config-default": "^2.0.3", "next": "11.0.1", "react": "17.0.2",

Code I wrriten

import { HtmlEditor, Toolbar, Editor } from "@aeaton/react-prosemirror"; import { plugins, schema, toolbar, } from "@aeaton/react-prosemirror-config-default";

<HtmlEditor value={this.state.initialValue} handleChange={this.onChange} debounce={250}

As per the mentioned in document: https://github.com/hubgit/react-prosemirror

hubgit commented 2 years ago

This seems to be generally a problem with Next.js, with an open RFC.