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

Running the nodejs example #916

Open
jerryduncan opened this issue Jul 13, 2023 · 1 comment
Open

Running the nodejs example #916

jerryduncan opened this issue Jul 13, 2023 · 1 comment

Comments

@jerryduncan
Copy link

Am finding issues running the nodejs example, after running npm install, then try to run ts-node faceDetection.ts i get this error `C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
faceDetection.ts:1:26 - error TS2307: Cannot find module 'face-api.js' or its corresponding type declarations.

1 import * as faceapi from 'face-api.js';
~~~~~~~~~~~~~
faceDetection.ts:5:16 - error TS2354: This syntax requires an imported helper but module 'tslib' cannot be found.

5 async function run() {
~~~

at createTSError (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:859:12)
at reportTSError (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:863:19)
at getOutput (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1077:36)
at Object.compile (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1433:41)
at Module.m._compile (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Object.require.extensions.<computed> [as .ts] (C:\Users\USER\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Function.Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {

diagnosticCodes: [ 2307, 2354 ]
}`

@angy71
Copy link

angy71 commented Aug 26, 2023

How the above issue was solved?

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

2 participants