我正在使用react-codemirror2。我使用npx create-react-app appname创建我的应用程序。
但是当我尝试运行开发服务器时,它给出了以下错误-
./node_modules/codemirror/mode/rpm/changes/index.html 1:0
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type.
> <!doctype html>
|
| <title>CodeMirror: RPM changes mode</title>一种建议的解决方案是更改modulesDirectories。我试着使用npm run eject来做这件事。但没有成功做到这一点。
请帮我做同样的事
发布于 2019-03-22 12:38:46
doctype声明不正确,应该是:
<!DOCTYPE html>请注意,DOCTYPE应大写。
https://stackoverflow.com/questions/55292755
复制相似问题