InSyncWithFoo / pyright-langserver-for-pycharm

Pyright language server integration for PyCharm Professional
https://insyncwithfoo.github.io/pyright-langserver-for-pycharm/
MIT License
51 stars 2 forks source link

LSP Pyright terminated #76

Closed milselarch closed 2 months ago

milselarch commented 2 months ago

What happened?

pyright plugin termminated after isntalling and setting up

Steps to reproduce

setup pyright as follows installed pyright using npm install -g pyright
Screenshot from 2024-08-24 15-52-26

Relevant log output or stack trace

Server Error Output:  

/home/milselarch/.nvm/versions/node/v20.10.0/lib/node_modules/pyright/dist/vendor.js:2
exports.id=968,exports.ids=[968],exports.modules={6596:(A,e,t)=>{"use strict";const r=t(1160),o=global.Date;class i extends o{constructor(A){super(A),this.isDate=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}`}}A.exports=A=>{const e=new i(A);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},4023:(A,e,t)=>{"use strict";const r=t(1160);class o extends Date{constructor(A){super(A+"Z"),this.isFloating=!0}toISOString(){return`${this.getUTCFullYear()}-${r(2,this.getUTCMonth()+1)}-${r(2,this.getUTCDate())}T${r(2,this.getUTCHours())}:${r(2,this.getUTCMinutes())}:${r(2,this.getUTCSeconds())}.${r(3,this.getUTCMilliseconds())}`}}A.exports=A=>{const e=new o(A);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},692:A=>{"use strict";A.exports=A=>{const e=new Date(A);if(isNaN(e))throw new TypeError("Invalid Datetime");return e}},7640:(A,e,t)=>{"use strict"
SyntaxError: Unexpected token ;
    at Module._compile (internal/modules/cjs/loader.js:723:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at Object.o.f.require (/home/milselarch/.nvm/versions/node/v20.10.0/lib/node_modules/pyright/dist/pyright-langserver.js:1:2293)
    at Promise.all.Object.keys.reduce (/home/milselarch/.nvm/versions/node/v20.10.0/lib/node_modules/pyright/dist/pyright-langserver.js:1:1762)
    at Array.reduce (<anonymous>)
StdIO connection closed
Exit code: 1
Command line: /home/milselarch/.nvm/versions/node/v20.10.0/bin/pyright-langserver --stdio

Operating system

Linux

InSyncWithFoo commented 2 months ago

This doesn't seem to be a problem with the plugin. Node is telling us that it can't parse the script file, which should also be the case even if you were to run the command /home/milselarch/.nvm/versions/node/v20.10.0/bin/pyright-langserver --stdio manually. If it isn't, then I'll need some more information to replicate the problem.

It's also possible that the files are corrupted somehow. Try reinstalling Pyright to see if anything changes.

InSyncWithFoo commented 2 months ago

I'm closing this issue. If the problem arises again, please post a comment here with more details; I'll reopen it.