RobertCraigie / pyright-python

Python command line wrapper for pyright, a static type checker
https://pypi.org/project/pyright/
MIT License
178 stars 22 forks source link

fsevents not installed on MacOS #191

Closed adampauls closed 1 year ago

adampauls commented 1 year ago

Main issue here. If I set export CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR=1 and run pyright -w, I see

Error: Cannot find module 'fsevents'
Require stack:
- /Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js
- /Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at 4943 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:84)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816)
    at 5047 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/vendor.js:2:464020)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816)
    at 8590 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/vendor.js:2:451691)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js',
    '/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/index.js'
  ]
}

I'm using pyright 1.1.316. If I manually run npm install fsevents in the $HOME/.cache/pyright-python/1.1.316 directory, then the error goes away.

Glawill commented 1 year ago

Main issue here. If I set export CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR=1 and run pyright -w, I see

Error: Cannot find module 'fsevents'
Require stack:
- /Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js
- /Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at 4943 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:84)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816)
    at 5047 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/vendor.js:2:464020)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816)
    at 8590 (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/vendor.js:2:451691)
    at i (/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js:1:816) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/dist/pyright.js',
    '/Users/adpauls/.cache/pyright-python/1.1.316/node_modules/pyright/index.js'
  ]
}

I'm using pyright 1.1.316. If I manually run npm install fsevents in the $HOME/.cache/pyright-python/1.1.316 directory, then the error goes away.

why i always push to git it gives me an error

adampauls commented 1 year ago

Fixed by https://github.com/microsoft/pyright/pull/5503.