Thanks to visit codestin.com
Credit goes to github.com

Skip to content

How do I run this app? #5

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

Open
PrashantSaikia opened this issue Aug 24, 2020 · 3 comments
Open

How do I run this app? #5

PrashantSaikia opened this issue Aug 24, 2020 · 3 comments

Comments

@PrashantSaikia
Copy link

I installed all the packages and dependencies with sudo npm install -g nodemon. Then when I want to run the project with node script.js, this is what I get:

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/username/Downloads/Face-Recognition-JavaScript-master/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/username/Downloads/Face-Recognition-JavaScript-master/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2020-08-24T06_01_03_368Z-debug.log
username@Users-MBP Face-Recognition-JavaScript-master % node script.js
/Users/username/Downloads/Face-Recognition-JavaScript-master/script.js:1
const imageUpload = document.getElementById('imageUpload')
                    ^

ReferenceError: document is not defined
    at Object.<anonymous> (/Users/username/Downloads/Face-Recognition-JavaScript-master/script.js:1:21)
    at Module._compile (internal/modules/cjs/loader.js:1133:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
    at Module.load (internal/modules/cjs/loader.js:977:32)
    at Function.Module._load (internal/modules/cjs/loader.js:877:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
    at internal/main/run_main_module.js:18:47

How do I run this app?

@sayannath
Copy link

Have to install all the packages like this npm i?

@amouratoglou
Copy link

really? there is not package.json

@amouratoglou
Copy link

amouratoglou commented Sep 13, 2023

the way to run is to create a node server to serve the index.html file
a quick way:

npx serve
then open
http://localhost:3000

this could be included in the docs to help others try the example locally.

the index.html file won't resolve well the JS modules maps within an Apache server,

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