1

I'm starting to look at interactive maps and I found the project react-svg-map. I was following along on the example and I come across this issue:

import Taiwan from "@svg-maps/taiwan";

They said that they split the maps svg code into a separate repo. Down below on the page they say that we need to install it separately and then point to the specific map we want.

I imported these two packages

npm install --save react-svg-map
npm install --save svg-maps

But when I copied the code and ran npm start I got the following error:

Module not found: Can't resolve '@svg-maps/taiwan' in 'C:\...'

What does the @ mean in the import and how do I import the svg-maps package. Do I need to have a folder that called svg-maps/taiwan in the same folder as the App.js script? Or is this something completely difference?

Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129
Micah Pearce
  • 1,805
  • 3
  • 28
  • 61

1 Answers1

2

They said it's now needed to install the maps from the svg-maps packages. For Taiwan, it's @svg-maps/taiwan as seen in the documentation for it.

npm install --save @svg-maps/taiwan

The @ sign on npm just denotes scoped-packages, not to be confused with the common alias used in various projects configuration.

Emile Bergeron
  • 17,074
  • 5
  • 83
  • 129