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

error TS2304: Cannot find name 'Long'. #2

Open
huan opened this issue Jan 6, 2022 · 1 comment
Open

error TS2304: Cannot find name 'Long'. #2

huan opened this issue Jan 6, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@huan
Copy link
Owner

huan commented Jan 6, 2022

Reproduce steps

$ git clone [email protected]:huan/ng-plus-wechaty.git
$ cd ng-plus-wechaty/my-app

$ git checkout 1251397
Note: switching to '1251397'.
HEAD is now at 1251397 0.0.14

$ npm install
$ npm start

> [email protected] start
> ng serve

****************************************************************************************
This is a simple server for use in testing or debugging Angular applications locally.
It hasn't been reviewed for security issues.

DON'T USE IT FOR PRODUCTION!
****************************************************************************************
✔ Browser application bundle generation complete.

Initial Chunk Files   | Names         |  Raw Size | Estimated Transfer Size
main.js               | main          |   1.73 MB |               338.83 kB
polyfills.js          | polyfills     | 173.14 kB |                45.44 kB
styles.css, styles.js | styles        | 127.33 kB |                32.07 kB
runtime.js            | runtime       |   1.40 kB |               748 bytes

                      | Initial Total |   2.02 MB |               417.07 kB

Build at: 2022-01-06T06:07:44.969Z - Hash: f1bdecb836888d95 - Time: 13186ms

Warning: /home/huan/git/huan/ng-plug-wechaty/my-app/node_modules/@tensorflow-models/toxicity/dist/toxicity.esm.js depends on '@tensorflow/tfjs-core'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies



Error: node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/hash_util.d.ts:2:49 - error TS2304: Cannot find name 'Long'.

2 export declare function hexToLong(hex: string): Long;
                                                  ~~~~


Error: node_modules/@tensorflow/tfjs/node_modules/@tensorflow/tfjs-core/dist/hash_util.d.ts:3:69 - error TS2304: Cannot find name 'Long'.

3 export declare function fingerPrint64(s: Uint8Array, len?: number): Long;
                                                                      ~~~~

Error: node_modules/@types/webgl2/index.d.ts:582:13 - error TS2403: Subsequent variable declarations must have the same type.  Variable 'WebGL2RenderingContext' must be of type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_UNIFORM_BLOCKS: number; readonly ALREADY_SIGNALED: number; ... 556 more ...; readonly ZERO: number; }', but here has type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_ATTRIBUTES: number; readonly ACTIVE_TEXTURE: number; ... 557 more ...; readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: number; }'.

582 declare var WebGL2RenderingContext: {
                ~~~~~~~~~~~~~~~~~~~~~~

  node_modules/typescript/lib/lib.dom.d.ts:14148:13
    14148 declare var WebGL2RenderingContext: {
                      ~~~~~~~~~~~~~~~~~~~~~~
    'WebGL2RenderingContext' was also declared here.


Error: node_modules/@types/webgl2/index.d.ts:1156:30 - error TS2304: Cannot find name 'WebGLObject'.

1156 interface WebGLQuery extends WebGLObject {
                                  ~~~~~~~~~~~

Related issue:

huan added a commit that referenced this issue Jan 6, 2022
@huan huan added the bug Something isn't working label Jan 6, 2022
@huan
Copy link
Owner Author

huan commented Jan 6, 2022

Workaround

huan added a commit that referenced this issue Jan 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant