You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to build the Angular project, the TypeScript compiler fails due to incorrect usage of Uint8Array in the type definitions of the uuid package. The errors indicate that Uint8Array is being treated as a generic type, which is invalid in TypeScript.
Error Details
× Failed to compile.
✔ Browser application bundle generation complete.
66 unchanged chunks
Build at: 2025-01-08T06:28:30.993Z - Hash: c915a44ab19f3024 - Time: 6673ms
Error: node_modules/uuid/dist/cjs/parse.d.ts:1:39 - error TS2315: Type ‘Uint8Array’ is not generic.
1 declare function parse(uuid: string): Uint8Array;
~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/uuid/dist/cjs/v35.d.ts:2:53 - error TS2315: Type ‘Uint8Array’ is not generic.
2 export declare function stringToBytes(str: string): Uint8Array;
~~~~~~~~~~~~~~~~~~~~~~~
Error: node_modules/uuid/dist/cjs/v35.d.ts:6:166 - error TS2315: Type ‘Uint8Array’ is not generic.
6 export default function v35(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: Uint8Array, offset?: number): string | Uint8Array;
~~~~~~~~~~~~~~~~~~~~~~~~~~~
× Failed to compile.
Expected Behavior
The Angular project should compile successfully without TypeScript errors related to the uuid package, resulting in a build output in the specified www directory.
Description
Description
When attempting to build the Angular project, the TypeScript compiler fails due to incorrect usage of
Uint8Array
in the type definitions of theuuid
package. The errors indicate thatUint8Array
is being treated as a generic type, which is invalid in TypeScript.Error Details
Expected Behavior
The Angular project should compile successfully without TypeScript errors related to the
uuid
package, resulting in a build output in the specifiedwww
directory.Environment
[email protected]
via[email protected]
[email protected]
via[email protected]
[email protected]
directly in the projectAdditional Information
Deprecated Packages Warnings:
[email protected]
,[email protected]
,[email protected]
,[email protected]
,@xmldom/[email protected]
,[email protected]
, and[email protected] & 3.0.2
.Potential Conflicts:
uuid
package might be causing type definition conflicts.Temporary Workaround Applied:
"skipLibCheck": true
totsconfig.json
to bypass type checking of declaration files, allowing the build to proceed.Possible Solutions Attempted
Skipped Library Type Checking:
tsconfig.json
to include:Attempted to Align
uuid
Package Versions:overrides
field inpackage.json
to force a singleuuid
version.uuid
versions.Explored Updating or Patching Affected Packages:
[email protected]
and[email protected]
depend on olderuuid
versions.References
See here:
uuidjs/uuid#856
Screenshots
No response
Operating System
No response
How to reproduce the Error?
Steps to Reproduce
Clone the Repository:
git clone https://github.com/OpenEMS/OpenEMS.git cd OpenEMS/ui
Clean Install Dependencies:
Run Build:
npx ng build -c "openems,openems-backend-prod,prod" --output-path=www
The text was updated successfully, but these errors were encountered: