AtomLinter / linter-glsl

Atom package that lints GLSL shaders on the fly.
https://atom.io/packages/linter-glsl
MIT License
15 stars 6 forks source link

Uncaught TypeError: path.basename is not a function #29

Closed claudiofantacci closed 8 years ago

claudiofantacci commented 8 years ago

System info:

Atom: 1.7.3 OS: OSX El Capitan 10.11.4 Thrown from: language-gsl 2.0.1 glslangValidator -version: Glslang Version: 3.0.729 19-Aug-2015 ESSL Version: OpenGL ES GLSL 3.00 glslang LunarG Khronos.3.0.729 19-Aug-2015 GLSL Version: 4.20 glslang LunarG Khronos.3.0.729 19-Aug-2015 SPIR-V Version 99, Revision 31 GLSL.std.450 Version 99, Revision 2 linter version: 1.11.4 language-glsl: 2.0.1

Stack trace

TypeError: path.basename is not a function
    at extractShaderFilenameTokens (/Users/Claudio/.atom/packages/linter-glsl/lib/linter-glsl.js:111:25)
    at Object.lint (/Users/Claudio/.atom/packages/linter-glsl/lib/linter-glsl.js:272:34)
    at promises.push.Promise.then._this.emitter.emit.linter (/Users/Claudio/.atom/packages/linter/lib/linter-registry.js:63:26)
    at /Users/Claudio/.atom/packages/linter/lib/linter-registry.js:62:23
    at Set.forEach (native)
    at LinterRegistry.lint (/Users/Claudio/.atom/packages/linter/lib/linter-registry.js:60:18)
    at /Users/Claudio/.atom/packages/linter/lib/linter.coffee:98:16
    at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
    at /Users/Claudio/.atom/packages/linter/lib/editor-linter.js:80:22
    at /Users/Claudio/.atom/packages/linter/lib/helpers.coffee:23:18

Steps to reproduce the error:

I simply click on the left pane on a GLSL recognised file (e.g. .vert or .frag) and the error shows up. Everything else seems to work fine and smoothly.

andystanton commented 8 years ago

@claudiofantacci can you update to v2.0.2 and see if that resolves the issue?

The path module was being loaded in at an odd place in the code before.

claudiofantacci commented 8 years ago

@andystanton updated!

The problem wasn't solved immediatly after the update, but after restarting the Atom the problem disappeared. It seems that everything is fine now!

Thanks 👍

andystanton commented 8 years ago

Great, I'll close this for now but feel free to re-open if you see the issue again.