导入时出错:'codemirror/lib/codemirror.css'

问题描述 投票:0回答:1

代码:

import React from 'react'

import 'codemirror/lib/codemirror.css';

export default function Editor() {

  return (

    <div>Editor</div>

  )

}

错误:

Module not found: Error: Can't resolve 'codemirror/lib/codemirror.css'

请提供此错误的解决方案..

reactjs import importerror codemirror react-codemirror
1个回答
0
投票
FIrst,run:- npm config set legacy-peer-deps true,
then try to run:- npm i codemirror@version5
It work Smoothly!!!!
© www.soinside.com 2019 - 2024. All rights reserved.