Error while importing: 'codemirror/lib/codemirror.css'

836 views Asked by At

Code:

import React from 'react'

import 'codemirror/lib/codemirror.css';

export default function Editor() {

  return (

    <div>Editor</div>

  )

}

Error:

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

Please provide a solution for this error..

1

There are 1 answers

0
Aakash Raturi On

First, run:

npm config set legacy-peer-deps true

After that try to run

npm i codemirror@version5

then restart the vs-code