Skip to content

How do I run this app? #5

Open
Open

Description

@PrashantSaikia

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?

Activity

  1. sayannath commented on Aug 15, 2021

    @sayannath

    Have to install all the packages like this npm i?

  2. amouratoglou commented on Sep 13, 2023

    @amouratoglou

    really? there is not package.json

  3. amouratoglou commented on Sep 13, 2023

    @amouratoglou

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions