Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create-react-app import react-https-redirect could not be found #12

Closed
michaeldino27 opened this issue Apr 2, 2019 · 5 comments
Closed

Comments

@michaeldino27
Copy link

michaeldino27 commented Apr 2, 2019

I was trying to import this npm package but it keep on saying: Could not find a declaration file for module 'react-https-redirect'.

I am importing it like so, import HttpsRedirect from 'react-https-redirect';
Another weird thing is that, after i deployed it in GAE, the redirection of http to https worked for a while, after 10min or so it didnt work already. until now.

Any help will be much appreciated.

@mbasso
Copy link
Owner

mbasso commented Apr 2, 2019

Hi,
I’ll try to reproduce it as soon as I can. Is it just a warning or an error? Might it be related to TypeScript?

@michaeldino27
Copy link
Author

michaeldino27 commented Apr 3, 2019

Hello @mbasso ,

Thanks you for the quick response on this, i am using js in my create-react-app and I'm importing it as the readme file says, and it gives me a warning when when you hover over the import saying "Could not find declaration". i also tried
const HttpsRedirect = require("react-https-redirect"); but also saying could not find declaration warning.

@michaeldino27
Copy link
Author

michaeldino27 commented Apr 3, 2019

Hi once again,
I did some research, i couldn't use this npm package because it doesn't have the dist folder.
Not so sure if it should have dist folder once installed, currently i did not get any dist folder after trying to install/reinstall this package.

@michaeldino27
Copy link
Author

Hello I am closing this issue.
After rounds of testing and deploying despite of the warning it worked surprisingly without modifying anything.

@mbasso
Copy link
Owner

mbasso commented May 1, 2019

@michaeldino27 thank you for the update 😄
Perfect!

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

No branches or pull requests

2 participants