-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
NativeBase components cannot be resolved in IDE (PhpStorm/WebStorm) #1075
Comments
+1 |
2 similar comments
+1 |
+1 |
For a temporary fix. In //import * as React from "react";
//import * as ReactNative from "react-native";
declare module "native-base" { |
@darkopetrovic Thank you so much. This worked. |
It works, thx |
thanks, works |
Any updates? The solution, as is says, is "temporary". Every time yarn / npm runs the fix is removed from the file. Edit; or is this an Intellij / Webstorm / Phpstorm /... issue? |
@darkopetrovic It works! This temporary fix might be a PR ;) |
@darkopetrovic thanks a lot. I fix it finally, that confuced me a lot before. |
Actually, this fix does not fix the problem fully. Imports begin working, but instead it breaks ability of IDE to suggest properties that inherited from base ReactNative components |
Guys, any progress here? |
Fixes the confusion in webstorm/phpstorm #1075
Fixed with NB 2.3.10 |
(cherry picked from commit 35614a5)
react-native, react and native-base version
RN: 0.45.1 React: 16.0.0-alpha.12 NativeBase: 2.2.0
Expected behaviour
Since NativeBase has its type definitions file within it (
node_modules/native-base/index.d.ts
) my IDE should be able to resolve imported components. All of my other dependencies can be resolved by PhpStorm without any problem, like: React, React-Native, Redux, propTypes etc.Actual behaviour
When I use following statement in my IDE (phpStorm)
I get: Cannot resolve symbol error for all the components imported.
Steps to reproduce (code snippet or screenshot)
Create a new project on PhpStorm with React, ReactNative and NativeBase. Then add the following import statement to any JS file.
Screenshot of emulator/device
N/A
Is the bug present in both ios and android or in any one of them?
N/A
Any other additional info which would help us debug the issue quicker.
N/A
The text was updated successfully, but these errors were encountered: