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

npm run build is failing #775

Open
mahi8813 opened this issue Nov 21, 2023 · 3 comments
Open

npm run build is failing #775

mahi8813 opened this issue Nov 21, 2023 · 3 comments

Comments

@mahi8813
Copy link

mahi8813 commented Nov 21, 2023

npm run build is failing since today morning. Apparently, it is failing because of @types/resize-observer-browser has been updated. There is a latest release happened today morning on this package causing this issue. Fixing the version to previous version in package.json is helping. Please suggest if this is a right fix for this

**FIX**
Change
 "@types/resize-observer-browser": "^0.1.7",
To
 "@types/resize-observer-browser": "0.1.7",

ERROR LOG


> [email protected] build /Users/300068322/work/git/more/recyclerlistview
> sh scripts/build.sh

Running TSLint...
typeof-compare is deprecated. Starting from TypeScript 2.2 the compiler includes this check which makes this rule redundant.
Build started...
Removing old builds...
Removing DEV mode code...
Isolating WEB code...
/Users/300068322/work/git/more/recyclerlistview/src
------------------------------- Directive Processing Started -------------------------------
$file:  /Users/300068322/work/git/more/recyclerlistview/src/core/RecyclerListView.tsx
------------------------------- Directive Processing Complete -------------------------------
TSC: Building ES5 web package...
node_modules/@types/lodash/common/collection.d.ts:1648:42 - error TS1005: ']' expected.

1648         sample<T>(collection: readonly [T, ...T[]]): T;
                                             ~

node_modules/@types/lodash/common/collection.d.ts:1648:48 - error TS1005: ',' expected.

1648         sample<T>(collection: readonly [T, ...T[]]): T;
                                                   ~

node_modules/@types/lodash/common/collection.d.ts:1648:50 - error TS1005: ')' expected.

1648         sample<T>(collection: readonly [T, ...T[]]): T;
                                                     ~

node_modules/@types/lodash/common/collection.d.ts:1648:51 - error TS1131: Property or signature expected.

1648         sample<T>(collection: readonly [T, ...T[]]): T;
                                                      ~

node_modules/@types/lodash/common/collection.d.ts:1648:52 - error TS1131: Property or signature expected.

1648         sample<T>(collection: readonly [T, ...T[]]): T;
                                                       ~

node_modules/@types/lodash/common/common.d.ts:7:33 - error TS1005: ';' expected.

7     type Many<T> = T | readonly T[];
                                 ~

node_modules/@types/lodash/common/common.d.ts:7:35 - error TS1011: An element access expression should take an argument.

7     type Many<T> = T | readonly T[];
                                   

node_modules/@types/lodash/common/object.d.ts:1025:21 - error TS1110: Type expected.

1025         : K extends `${number}`
                        ~~~

node_modules/@types/lodash/common/object.d.ts:1026:24 - error TS1005: ':' expected.

1026             ? 'length' extends keyof T
                           ~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1026:38 - error TS1005: ';' expected.

1026             ? 'length' extends keyof T
                                         ~

node_modules/@types/lodash/common/object.d.ts:1027:26 - error TS1005: ':' expected.

1027                 ? number extends T['length']
                             ~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1028:30 - error TS1005: ':' expected.

1028                     ? number extends keyof T
                                 ~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1028:44 - error TS1005: ';' expected.

1028                     ? number extends keyof T
                                               ~

node_modules/@types/lodash/common/object.d.ts:1031:21 - error TS1128: Declaration or statement expected.

1031                     : undefined
                        ~

node_modules/@types/lodash/common/object.d.ts:1043:41 - error TS1110: Type expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                            ~~~

node_modules/@types/lodash/common/object.d.ts:1043:50 - error TS1005: '}' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                     ~~~~

node_modules/@types/lodash/common/object.d.ts:1043:55 - error TS1128: Declaration or statement expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                          ~

node_modules/@types/lodash/common/object.d.ts:1043:57 - error TS1005: ';' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                            ~

node_modules/@types/lodash/common/object.d.ts:1043:64 - error TS1005: ';' expected.

1043     type GetFieldType<T, P> = P extends `${infer Left}.${infer Right}`
                                                                   ~~~~~

node_modules/@types/lodash/common/object.d.ts:1046:29 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                ~

node_modules/@types/lodash/common/object.d.ts:1046:30 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                 ~

node_modules/@types/lodash/common/object.d.ts:1046:37 - error TS1005: ';' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                        ~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1046:48 - error TS1005: ',' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                                   ~

node_modules/@types/lodash/common/object.d.ts:1046:55 - error TS1005: ',' expected.

1046             : Left extends `${infer FieldKey}[${infer IndexKey}]`
                                                          ~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1053:26 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                             ~

node_modules/@types/lodash/common/object.d.ts:1053:27 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                              ~

node_modules/@types/lodash/common/object.d.ts:1053:34 - error TS1005: ';' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                     ~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1053:45 - error TS1005: ',' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                                ~

node_modules/@types/lodash/common/object.d.ts:1053:52 - error TS1005: ',' expected.

1053             : P extends `${infer FieldKey}[${infer IndexKey}]`
                                                       ~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1307:23 - error TS1005: ';' expected.

1307          * Checks if `path` is a direct property of `object`.
                          ~~~~

node_modules/@types/lodash/common/object.d.ts:1307:54 - error TS1005: ';' expected.

1307          * Checks if `path` is a direct property of `object`.
                                                         ~~~~~~

node_modules/@types/lodash/common/object.d.ts:1312:30 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                 ~~~~

node_modules/@types/lodash/common/object.d.ts:1312:40 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                           ~~~~

node_modules/@types/lodash/common/object.d.ts:1312:60 - error TS1005: ';' expected.

1312          * @returns Returns `true` if `path` exists, else `false`.
                                                               ~~~~~

node_modules/@types/lodash/common/object.d.ts:1346:23 - error TS1005: ';' expected.

1346          * Checks if `path` is a direct or inherited property of `object`.
                          ~~~~

node_modules/@types/lodash/common/object.d.ts:1346:67 - error TS1005: ';' expected.

1346          * Checks if `path` is a direct or inherited property of `object`.
                                                                      ~~~~~~

node_modules/@types/lodash/common/object.d.ts:1351:30 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                 ~~~~

node_modules/@types/lodash/common/object.d.ts:1351:40 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                           ~~~~

node_modules/@types/lodash/common/object.d.ts:1351:60 - error TS1005: ';' expected.

1351          * @returns Returns `true` if `path` exists, else `false`.
                                                               ~~~~~

node_modules/@types/lodash/common/object.d.ts:1751:16 - error TS1005: ';' expected.

1751          * to `undefined`. Array and plain object properties are merged recursively.
                   ~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1756:43 - error TS1005: ';' expected.

1756          * **Note:** This method mutates `object`.
                                              ~~~~~~

node_modules/@types/lodash/common/object.d.ts:1761:30 - error TS1005: ';' expected.

1761          * @returns Returns `object`.
                                 ~~~~~~

node_modules/@types/lodash/common/object.d.ts:1842:33 - error TS1005: ';' expected.

1842          * This method is like `_.merge` except that it accepts `customizer` which
                                    ~

node_modules/@types/lodash/common/object.d.ts:1842:66 - error TS1005: ';' expected.

1842          * This method is like `_.merge` except that it accepts `customizer` which
                                                                     ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1844:28 - error TS1005: ';' expected.

1844          * properties. If `customizer` returns `undefined` merging is handled by the
                               ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1844:49 - error TS1005: ';' expected.

1844          * properties. If `customizer` returns `undefined` merging is handled by the
                                                    ~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1845:33 - error TS1005: ';' expected.

1845          * method instead. The `customizer` is invoked with seven arguments:
                                    ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:1852:30 - error TS1005: ';' expected.

1852          * @returns Returns `object`.
                                 ~~~~~~

node_modules/@types/lodash/common/object.d.ts:1938:29 - error TS1005: ';' expected.

1938          * The opposite of `_.pick`; this method creates an object composed of the
                                ~

node_modules/@types/lodash/common/object.d.ts:1939:56 - error TS1005: ';' expected.

1939          * own and inherited enumerable properties of `object` that are not omitted.
                                                           ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2000:29 - error TS1005: ';' expected.

2000          * The opposite of `_.pickBy`; this method creates an object composed of the
                                ~

node_modules/@types/lodash/common/object.d.ts:2001:56 - error TS1005: ';' expected.

2001          * own and inherited enumerable properties of `object` that `predicate`
                                                           ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2001:70 - error TS1005: ';' expected.

2001          * own and inherited enumerable properties of `object` that `predicate`
                                                                         ~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2051:54 - error TS1005: ';' expected.

2051          * Creates an object composed of the picked `object` properties.
                                                         ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2093:47 - error TS1005: ';' expected.

2093          * Creates an object composed of the `object` properties `predicate` returns
                                                  ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2093:67 - error TS1005: ';' expected.

2093          * Creates an object composed of the `object` properties `predicate` returns
                                                                      ~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2443:33 - error TS1005: ';' expected.

2443          * This method is like `_.update` except that it accepts `customizer` which is
                                    ~

node_modules/@types/lodash/common/object.d.ts:2443:67 - error TS1005: ';' expected.

2443          * This method is like `_.update` except that it accepts `customizer` which is
                                                                      ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2444:47 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                  ~~~~

node_modules/@types/lodash/common/object.d.ts:2444:59 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                              ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2444:80 - error TS1005: ';' expected.

2444          * invoked to produce the objects of `path`.  If `customizer` returns `undefined`
                                                                                   ~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2445:65 - error TS1005: ';' expected.

2445          * path creation is handled by the method instead. The `customizer` is invoked
                                                                    ~~~~~~~~~~

node_modules/@types/lodash/common/object.d.ts:2448:43 - error TS1005: ';' expected.

2448          * **Note:** This method mutates `object`.
                                              ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2456:30 - error TS1005: ';' expected.

2456          * @returns Returns `object`.
                                 ~~~~~~

node_modules/@types/lodash/common/object.d.ts:2581:1 - error TS1160: Unterminated template literal.

2581 
    

node_modules/@types/resize-observer-browser/index.d.ts:38:38 - error TS1005: ';' expected.

38     readonly borderBoxSize: readonly ResizeObserverSize[];
                                       ~~~~~~~~~~~~~~~~~~

node_modules/@types/resize-observer-browser/index.d.ts:38:57 - error TS1011: An element access expression should take an argument.

38     readonly borderBoxSize: readonly ResizeObserverSize[];
                                                          

node_modules/@types/resize-observer-browser/index.d.ts:39:5 - error TS1128: Declaration or statement expected.

39     readonly contentBoxSize: readonly ResizeObserverSize[];
      ~~~~~~~~

node_modules/@types/resize-observer-browser/index.d.ts:39:39 - error TS1005: ';' expected.

39     readonly contentBoxSize: readonly ResizeObserverSize[];
                                        ~~~~~~~~~~~~~~~~~~

node_modules/@types/resize-observer-browser/index.d.ts:39:58 - error TS1011: An element access expression should take an argument.

39     readonly contentBoxSize: readonly ResizeObserverSize[];
                                                           

node_modules/@types/resize-observer-browser/index.d.ts:40:5 - error TS1128: Declaration or statement expected.

40     readonly devicePixelContentBoxSize: readonly ResizeObserverSize[];
      ~~~~~~~~

node_modules/@types/resize-observer-browser/index.d.ts:40:50 - error TS1005: ';' expected.

40     readonly devicePixelContentBoxSize: readonly ResizeObserverSize[];
                                                   ~~~~~~~~~~~~~~~~~~

node_modules/@types/resize-observer-browser/index.d.ts:40:69 - error TS1011: An element access expression should take an argument.

40     readonly devicePixelContentBoxSize: readonly ResizeObserverSize[];
                                                                      

node_modules/@types/resize-observer-browser/index.d.ts:41:1 - error TS1128: Declaration or statement expected.

41 }
  ~


Found 74 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: `sh scripts/build.sh`
npm ERR! Exit status 2
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/300068322/.npm/_logs/2023-11-21T06_04_39_804Z-debug.log```
@mahi8813
Copy link
Author

@naqvitalha Please look into this. Our release cycles are blocked by this issue.

@ehsan6sha
Copy link

@mahi8813 did you get it to build?

@irisjae
Copy link

irisjae commented Mar 29, 2024

I, too, ran into many problems with tsc when building this package (both issues due to imports, and issues from within the package itself). I switched the typescript version used to the latest version (5.4.3), and the issues due to imports appear to have gone away (the typescript version specified in this library was at 3.3.1). A small number of type issues still remained in the package, and I simply suppressed them. After that, I could get the package to build.

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

3 participants