VaguelySerious / react-quill

A Quill component for React.
https://zenoamaro.github.io/react-quill/
MIT License
47 stars 15 forks source link

An error occurred while trying to read the map file at quill.snow.css.map #9

Closed 5M7-Api closed 1 month ago

5M7-Api commented 1 month ago

When I run my project using vite in a nodejs environment, the following error occurs.

Failed to load source map for C:/(files path)/node_modules/react-quill-new/dist/quill.snow.css.

Error: An error occurred while trying to read the map file at quill.snow.css.map

Error: ENOENT: no such file or directory, open 'C:(files path)\node_modules\react-quill-new\dist\quill.snow.css.map'

But when I tested the functionality of the rich text editor, there were no obvious anomalies or errors in the style or operation process.

package version:

VaguelySerious commented 1 month ago

The sourcemap file (quill.snow.css.map) isn't required for normal operation, and this npm package currently doesn't re-export the sourcemap files.

If you just want the error to go away, you can import the CSS file from react-quill-new/node_modules/quill/dist/quill.snow.css instead, where a matching map file is defined.

5M7-Api commented 1 month ago

The sourcemap file (quill.snow.css.map) isn't required for normal operation, and this npm package currently doesn't re-export the sourcemap files.

If you just want the error to go away, you can import the CSS file from react-quill-new/node_modules/quill/dist/quill.snow.css instead, where a matching map file is defined.

Thanks for your help. When I tried to build the project, I got the following error.

image

I reinstalled the react-quill(npm install react-quill --save) package to solve this problem. I wonder if my solution is correct? Is this error expected?

VaguelySerious commented 1 month ago

You're probably importing react-quill somewhere, when you should be importing react-quill-new instead

5M7-Api commented 1 month ago

You're probably importing react-quill somewhere, when you should be importing react-quill-new instead

I found the error in the vite configuration file and have successfully built it. Thank you for your patient help.