Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Module dont import in react #7

Open
rortegac opened this issue Sep 12, 2018 · 2 comments
Open

Module dont import in react #7

rortegac opened this issue Sep 12, 2018 · 2 comments

Comments

@rortegac
Copy link

I have a problem when i trying to import the module in my code. When i do this:

import React from 'react';
import WeatherIcons from 'react-weathericons';

const WeatherTemperature = ({ temperature, weatherState }) => (
    <div>
        <WeatherIcons name="cloud" size="2x" />
        <span>{`${temperature} Cº`}</span>
    </div>
);

The code report an error with react-weathericons module. It says that i need @types for de modole or the file .d.ts. When i create this file the error disappears, but the icons are still not show.

Node Version: 8.11.4
npm Version: 5.6.0

@rortegac rortegac changed the title Modulo dont import in react Module dont import in react Sep 13, 2018
@lucaskatayama
Copy link
Owner

Hello @rortegac
First, this is an old project where I was learning to create modules with npm.
It has a big chance to be outdated.

Another thing, I think d.ts is a TypeScript specific file. When I was building this project I din't use TypeScript at all! So, the module doesn't have the type declaration which TypeScript needs.

Sorry!

@alfredoizjr
Copy link

I have the same issue is another version where I can find it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants