-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix: wrong types path (#1554) #1581
Conversation
Fix for Cannot find module 'react-native-image-picker' or its corresponding type declarations. react-native-image-picker#1554
Can you share your tsconfig setup (along with whatever other relevant setup), as I'm not experiencing this issue. |
I have a feeling that it is eslint's default configuration that showed this warning. But here's my tsconfig file and .eslintrc.json {
"compilerOptions": {
"baseUrl": ".",
"allowJs": true,
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"noEmit": true,
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true
},
"include": ["**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx"],
"exclude": [
"node_modules",
"babel.config.js",
"jest.config.js",
"**/*.test.ts",
"**/*.test.tsx"
]
} {
"extends": [
"@react-native-community",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "import"],
"overrides": [
{
"files": ["__mocks__/**/*.ts", "__mocks__/**/*.tsx"],
"env": {
"jest": true
}
}
],
"settings": {
"import/ignore": ["node_modules/react-native/index\\.js$"],
"import/extensions": [".js", ".jsx", ".ts", ".tsx"],
"import/order": [
"error",
{
"groups": ["builtin", "external", "internal"],
"pathGroups": [
{
"pattern": "react",
"group": "external",
"position": "before"
},
{
"pattern": "@moxie/**",
"group": "internal",
"position": "after"
}
],
"pathGroupsExcludedImportTypes": ["react"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
},
"rules": {
"react-native/no-unused-styles": "error",
"react-native/sort-styles": ["error", "asc"],
"react-hooks/exhaustive-deps": "warn",
"import/no-unresolved": "off",
"import/namespace": "off",
"react/jsx-sort-props": [
"error",
{
"ignoreCase": true
}
],
"@typescript-eslint/no-unused-vars": "off"
}
}
Curious if it matters, there's no |
@xgenem good point about there being no Having a look at the history, it was changed away from this PR's change to include Let me investigate a bit more. |
When I build the package locally, it does have When viewing the package via my node_modules (where I install via npm), it doesn't include the src folder: Nor is it included on unpkg: https://unpkg.com/browse/react-native-image-picker@3.1.3/lib/typescript/ |
The folder still existed in 3.1.1. The only real change I can think of then was CI deployments, as no relevant code changed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! I find it weird. Thanks for staying on top of this. |
🎉 This PR is included in version 3.1.4 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [3.1.4](react-native-image-picker/react-native-image-picker@v3.1.3...v3.1.4) (2021-01-19) ### Bug Fixes * wrong types path ([#1554](react-native-image-picker/react-native-image-picker#1554)) ([#1581](react-native-image-picker/react-native-image-picker#1581)) ([fd27d94](react-native-image-picker/react-native-image-picker@fd27d94))
## [3.1.4](react-native-image-picker/react-native-image-picker@v3.1.3...v3.1.4) (2021-01-19) ### Bug Fixes * wrong types path ([#1554](react-native-image-picker/react-native-image-picker#1554)) ([#1581](react-native-image-picker/react-native-image-picker#1581)) ([2f90b4d](react-native-image-picker/react-native-image-picker@2f90b4d))
Fix for Cannot find module 'react-native-image-picker' or its corresponding type declarations. #1554
Motivation (required)
What existing problem does the pull request solve?
This fixes the issue 'Cannot find module 'react-native-image-picker' or its corresponding type declarations.' #1554
Test Plan (required)
Tested fine after changing
types
path.