-
Notifications
You must be signed in to change notification settings - Fork 43
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
TypeScript Compile errors #91
Comments
Thanks for pointing out.
|
I'm not sure if this belongs to this issue, but perhaps it's worth mentioning as it's related to TS errors. While trying to make run one of my react-native apps in web using ERROR in ./node_modules/@robinbobin/react-native-google-drive-api-wrapper/GDrive.ts 7:10
Module parse failed: Unexpected token (7:10)
File was processed with these loaders:
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
|
| export default class GDrive {
> private readonly __apis = new Map <string, GDriveApi> ();
|
| constructor() {
ERROR in ./node_modules/@robinbobin/react-native-google-drive-api-wrapper/HttpError.ts 2:10
Module parse failed: Unexpected token (2:10)
File was processed with these loaders:
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| export default class HttpError extends Error {
> private __json?: any;
| private __response: Response;
| private __text?: string;
ERROR in ./node_modules/@robinbobin/react-native-google-drive-api-wrapper/ListQueryBuilder.ts 3:5
Module parse failed: Unexpected token (3:5)
File was processed with these loaders:
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
| import { StaticUtils } from "simple-common-utils";
|
> type Key = string;
| type Value = boolean | number | string;
| type KeyOrValue = Key | Value;
ERROR in ./node_modules/@robinbobin/react-native-google-drive-api-wrapper/MimeTypes.ts 1:0
Module parse failed: The keyword 'enum' is reserved (1:0)
File was processed with these loaders:
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
> enum MimeTypes {
| BINARY = 'application/octet-stream',
| CSV = 'text/csv',
ERROR in ./node_modules/@robinbobin/react-native-google-drive-api-wrapper/UnexpectedFileCountError.ts 1:5
Module parse failed: Unexpected token (1:5)
File was processed with these loaders:
* ./node_modules/source-map-loader/dist/cjs.js
You may need an additional loader to handle the result of these loaders.
> type ExpectedCount = number[] | number;
|
| export default class UnexpectedFileCountError extends Error { Now it may seem that this is related to how I'm loading the files. However when using My first idea is that the ts-files aren't transpiled to js, and thus webpack isn't scooping up the library correctly with Either way, currently being prohibited from using this wonderful wrapper outside an iOS and Android context, which works otherwise very well, and which I'm very grateful for it. |
Hi @adamblvck , |
@RobinBobin Expo (using EAS workflow) actually works quite well with your lib! |
Good luck 👍 ! |
@adamblvck did you bypass it? how to ignore these code from type-check? |
@RobinBobin https://github.com/RobinBobin/react-native-google-drive-api-wrapper/pull/96/files |
Still error type-check from 1.2.4 |
I found myself having this error with an Expo project and to solve it I just created a new declare module "simple-common-utils";
declare module "utf8"; PD: Thanks for the library @RobinBobin, it has been a lifesaver 🙌 |
Guys, I retrofitted the library, typing everything properly. |
This package causes several TSC errors.
node_modules/@robinbobin/react-native-google-drive-api-wrapper/ListQueryBuilder.ts(1,29): error TS7016: Could not find a declaration file for module 'simple-common-utils'. '/home/runner/work/cloudqr-app/cloudqr-app/node_modules/simple-common-utils/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/simple-common-utils
if it exists or add a new declaration (.d.ts) file containingdeclare module 'simple-common-utils';
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/aux/Uris.ts(1,34): error TS7016: Could not find a declaration file for module 'simple-common-utils'. '/home/runner/work/cloudqr-app/cloudqr-app/node_modules/simple-common-utils/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/simple-common-utils
if it exists or add a new declaration (.d.ts) file containingdeclare module 'simple-common-utils';
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/aux/uploaders/MultipartUploader.ts(4,8): error TS7016: Could not find a declaration file for module 'simple-common-utils'. '/home/runner/work/cloudqr-app/cloudqr-app/node_modules/simple-common-utils/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/simple-common-utils
if it exists or add a new declaration (.d.ts) file containingdeclare module 'simple-common-utils';
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/aux/uploaders/MultipartUploader.ts(5,18): error TS7016: Could not find a declaration file for module 'utf8'. '/home/runner/work/cloudqr-app/cloudqr-app/node_modules/utf8/utf8.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/utf8
if it exists or add a new declaration (.d.ts) file containingdeclare module 'utf8';
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/aux/utils.ts(5,8): error TS7016: Could not find a declaration file for module 'simple-common-utils'. '/home/runner/work/cloudqr-app/cloudqr-app/node_modules/simple-common-utils/index.js' implicitly has an 'any' type.
Try
npm i --save-dev @types/simple-common-utils
if it exists or add a new declaration (.d.ts) file containingdeclare module 'simple-common-utils';
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/permissions/Permissions.ts(11,40): error TS2322: Type 'object | undefined' is not assignable to type 'object'.
Type 'undefined' is not assignable to type 'object'.
node_modules/@robinbobin/react-native-google-drive-api-wrapper/api/permissions/Permissions.ts(17,54): error TS2322: Type 'object | undefined' is not assignable to type 'object'.
Type 'undefined' is not assignable to type 'object'.
The text was updated successfully, but these errors were encountered: