Home > Net >  Having a problem with installing a package on React 18
Having a problem with installing a package on React 18

Time:05-18

I tried to install react-neshan-map-leaflet and everything was installed well without errors,

After the project started, I saw this error:

ERROR in ./node_modules/react-neshan-map-leaflet/dist/NeshanMap.js 2:0-60
Module not found: Error: Can't resolve './loaders/neshan_map_loader' in 'C:\Users\Desktop\time-line\node_modules\react-neshan-map-leaflet\dist'
Did you mean 'neshan_map_loader.js'?
BREAKING CHANGE: The request './loaders/neshan_map_loader' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

CodePudding user response:

finally i could find the way , maybe it will work with you too: i used the react 18 , first i changed the version to 17.0.2 after that i used the lower version of package and every things work well.

  • Related