ts-node faceDetection.js ------- Error: Cannot find module
Helllo
I am following the instructions in the link :"https://github.com/justadudewhohacks/face-api.js".
When I run the command "ts-node faceDetection.js", it throws the following error:
Error: Cannot find module 'D:\TECHEXP\face\facerec-js-git\face-api.js\examples\examples-nodejs\node_modules\face-api.js\build\commonjs\index.js'. Please verify that the package.json has a valid "main" entry
I can't seem to find out the root cause. Any directions?
Thank You Deepak
Hello
When I run the command "tsc faceDetection.ts"
I get the following error:
tsc faceDetection.ts commons/env.ts:5:26 - error TS2307: Cannot find module 'face-api.js' or its corresponding type declarations.
5 import * as faceapi from 'face-api.js'; ~~~~~~~~~~~~~
commons/faceDetection.ts:1:26 - error TS2307: Cannot find module 'face-api.js' or its corresponding type declarations.
i also have the same error
You can find the solution to that problem here: https://github.com/justadudewhohacks/face-api.js/issues/491#issuecomment-569703137. Happy hacking :)
can't build getting [email protected] build rm -rf ./build && rm -rf ./dist && npm run rollup && npm run rollup-min && npm run tsc && npm run tsc-es6
'rm' is not recognized as an internal or external command, operable program or batch file. npm ERR! code 1 npm ERR! path D:\Programming\face-api.js-2nd npm ERR! command failed npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c rm -rf ./build && rm -rf ./dist && npm run rollup && npm run rollup-min && npm run tsc && npm run tsc-es6
Everything mostly worked for me (I do get a simple error in the command "tsc FaceDetection.ts", but that doesn't stop me from running the next command: "node FaceDetection.js").
@marksamfd : Looks like you are running on Windows. "rm" is typically an Unix command
yes what can I do??
yes what can I do??
Can you ignore this error and run the next commands. Does that work?
yes what can I do??
Can you ignore this error and run the next commands. Does that work?
yah worked thanks a lot
Hi im always getting this error
Is there a ways so i can fix this
sl3@luciano-GrIA:~/face-api.js/examples/examples-nodejs$ ts-node faceDetection.ts
Error: Cannot find module '/home/sl3/face-api.js/examples/examples-nodejs/node_modules/face-api.js/build/commonjs/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:425:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:638:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1012:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/lib/node_modules/ts-node/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18)
at Object.