BasedHardware / OpenGlass

Turn any glasses into AI-powered smart glasses
https://openglass.ai
MIT License
2.8k stars 344 forks source link

NPM dependencies error #31

Closed kowyo closed 1 week ago

kowyo commented 3 weeks ago

Hi, I am using nvm with node.js 20.14.0(LTS)

I installed the dependencies by using the commands in README:

npm install

There were lots of deprecated waring btw.

but when I ran npm start, it gave errors like this:

Logs for your project will appear below. Press Ctrl+C to exit.
node:events:497
      throw er; // Unhandled 'error' event
      ^

Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:207:21)
Emitted 'error' event on NodeWatcher instance at:
    at FSWatcher._checkedEmitError (/Users/kowyo/Documents/OpenGlass/node_modules/metro-file-map/src/watchers/NodeWatcher.js:82:12)
    at FSWatcher.emit (node:events:519:28)
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:213:12) {
  errno: -24,
  syscall: 'watch',
  code: 'EMFILE',
  filename: null
}

Node.js v20.14.0

Would appreciate it if anyone knows how to fix this.

GALA009 commented 1 week ago

执行 npm start 之后,你是不是选择运行在web端?

kowyo commented 1 week ago

Yes

kowyo commented 1 week ago

Thank you @GALA009 , I solved it by adding

"browser": {
    "fs": false
  }

to the end of package.json.