atom / fuzzy-finder

Find and open files quickly
MIT License
275 stars 138 forks source link

Uncaught Error: EINVAL: invalid argument, lstat '~/OneDrive' #324

Open elubdynasty opened 6 years ago

elubdynasty commented 6 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.19.5 x64 Electron: 1.6.9 OS: Microsoft Windows 10 Pro Insider Preview Thrown From: fuzzy-finder package 1.5.8

Stack Trace

Uncaught Error: EINVAL: invalid argument, lstat 'C:\Users\lvclu\OneDrive'

fuzzyfinder

At fs.js:902

Error: EINVAL: invalid argument, lstat 'C:\Users\lvclu\OneDrive'
    at fs.lstatSync (fs.js:902:18)
    at Object.fs.lstatSync (ELECTRON_ASAR.js:244:16)
    at Proxy.realpathSync (fs.js:1542:21)
    at Proxy.fs.realpathSync (ELECTRON_ASAR.js:321:29)
    at ~/AppData/Local/atom/app-1.19.5/resources/app/node_modules/fuzzy-finder/lib/path-loader.js:21:27
    at Array.map (native)
    at Object.startTask (~/AppData/Local/atom/app-1.19.5/resources/app/node_modules/fuzzy-finder/lib/path-loader.js:19:52)
    at Object.startLoadPathsTask (~/AppData/Local/atom/app-1.19.5/resources/app/node_modules/fuzzy-finder/lib/main.js:119:45)
    at ~/AppData/Local/atom/app-1.19.5/resources/app/node_modules/fuzzy-finder/lib/main.js:33:30
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

Non-Core Packages

atom-typescript 11.0.7 
busy-signal 1.4.3 
git-plus 7.9.3 
intentions 1.1.5 
linter 2.2.0 
linter-ui-default 1.6.8 
50Wliu commented 6 years ago

@elubdynasty what did your Tree View look like when this happened?

jfgilliam commented 6 years ago

I'm getting the same error on Electron 1.6.5. Is there a workaround? Happens on a new Windows 10 system.

fs.js:902 return binding.lstat(pathModule._makeLong(path)); ^ Error EINVAL: invalid argument, lstat 'C:\Users\ntmad\OneDrive': at fs.lstatSync (fs.js:902:18) at Object.fs.lstatSync (ELECTRON_ASAR.js:244:16) at realpathSync (fs.js:1542:21) at Object.fs.realpathSync (ELECTRON_ASAR.js:331:24) at toRealPath (module.js:130:13) at Function.Module._findPath (module.js:178:22) at Function.Module._resolveFilename (module.js:468:25) at Function.Module._load (module.js:418:25) at Module.runMain (module.js:605:10) at run (bootstrap_node.js:428:7)

deiga commented 6 years ago

Could this be related to https://github.com/nodejs/node/issues/12737 ? This was solved in libuv 1.14.1 so if electron could updat their libuv version?

50Wliu commented 6 years ago

@deiga looks like it!

50Wliu commented 6 years ago

To keep track of when this bug should be fixed, libuv 1.14.1 is included in Node 9.3.0. So when Atom upgrades to an Electron version that uses Node 9.3.0+, it should be safe to close this issue.

WyattMufson commented 6 years ago

So does this mean that electron just doesn't work on Windows right now?

VinncentGS commented 6 years ago

Updating to 9.3.0+ does not fix the issue...

WyattMufson commented 6 years ago

The Electron 2 beta works

judsoncs commented 6 years ago

So updating to electron 2 beta fixes the issue? How does one do that?

quarkcanadian commented 6 years ago

so i think i fixed the issue. it appears that when you do npm install electron and npm install electron -g the lstat error becomes apparent. i removed electron using npm uninstall electron which i believe removes the electron module installed within the app while leaving the global one untouched. after i did this and ran npm start it worked