DuDigital/react-native-zoomable-view

TS7016: Could not find a declaration file for module '@dudigital/react-native-zoomable-view/src/ReactNativeZoomableView'.

SaeedZhiany opened this issue · 3 comments

I just installed v1.0.15, but when I want to import component I got the error message.
also, IDEA seems does not find the component props from the type definition file and so no suggestion provided by IDEA.

image

cc @SimonErich @adamaveray

@SaeedZhiany please try to import it generally as follows:

import { ReactNativeZoomableView } from '@dudigital/react-native-zoomable-view';

There are types for accessing directly from the src directly, but for some reason they don't work right now.
@adamaveray any idea why that is?

@SaeedZhiany @SimonErich Sorry for the delay! I think I must've had a few custom things going on when I set this up since it 'worked on my machine', but I've just set up a bare Typescript project to test and I'm seeing the same issue. Can you try using this repo? https://github.com/adamaveray/react-native-zoomable-view If that works for you I'll submit a new PR!

I've tried using the repo you suggested as follows:-

npm install https://github.com/adamaveray/react-native-zoomable-view.git

This adds to my package.json as follows:-

"@dudigital/react-native-zoomable-view": "git+https://github.com/adamaveray/react-native-zoomable-view.git"

I import like this:-

import ReactNativeZoomableView from "@dudigital/react-native-zoomable-view/src/ReactNativeZoomableView";

I still get an error when it compiles as below:-

`Module parse failed: Unexpected token (66:19)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| * @type {number}
| */

longPressTimeout = null;
|
| /**`