I run react vectormap on next.js after import VectorMap on component. I found this error its below.
Server Error
TypeError: Cannot set property 'vectorMap' of undefined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:3002610)
Object.
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:3002973)
Object.
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:3049709)
e
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:424)
Object.
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:3002360)
e
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:424)
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:781)
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:791)
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:86)
Object.
file:///D:/Project/my-dashboard/node_modules/react-jvectormap/build/index.js (1:300)
Module._compile
internal/modules/cjs/loader.js (1138:30)
Object.Module._extensions..js
internal/modules/cjs/loader.js (1158:10)
Module.load
internal/modules/cjs/loader.js (986:32)
Function.Module._load
internal/modules/cjs/loader.js (879:14)
Module.require
internal/modules/cjs/loader.js (1026:19)
require
internal/modules/cjs/helpers.js (72:18)
Hello
You still haven't solved this problem?
This is a duplicate of #29 and the solution is most likely in that thread.