noseglid / atom-build

:hammer: Build your project directly from the Atom editor
https://atom.io/packages/build
MIT License
248 stars 97 forks source link

Uncaught TypeError: Path must be a string. Received undefined #519

Open kelevro opened 7 years ago

kelevro commented 7 years ago

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.12.3 Thrown From: build package 0.67.0

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:7

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.isAbsolute (path.js:1202:5)
    at normalizePath (/packages/build/lib/linter-integration.js:21:30)
    at /packages/build/lib/linter-integration.js:36:17
    at Array.map (native)
    at Linter.processMessages (/packages/build/lib/linter-integration.js:32:38)
    at /packages/build/lib/build.js:196:36)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:493:12)

Commands

     -1:02.9.0 core:close (div.panels-item)
     -1:01.1.0 core:save (input.hidden-input)

Non-Core Packages

advanced-open-file 0.16.6 
atom-autocomplete-erlang 0.6.20 
atom-beautify 0.29.24 
atom-ctags 5.1.0 
atom-elixir 0.2.3 
atom-ternjs 0.18.3 
build 0.67.0 
build-elixir 0.7.0 
busy 0.7.0 
busy-signal 1.4.1 
easy-motion-redux 1.1.1 
emmet 2.4.3 
erb-snippets 1.1.0 
git-plus 7.9.1 
go-to-definition-rails 2.2.0 
goto-definition 1.3.3 
highlight-selected 0.13.1 
intentions 1.1.2 
language-ansible 0.2.1 
language-elixir 0.17.0 
language-erlang 3.2.0 
language-rspec 0.6.2 
language-slim 0.5.0 
last-cursor-position 0.9.2 
linter 2.1.4 
linter-elixirc 1.6.0 
linter-erb 1.1.0 
linter-erlang 0.4.0 
linter-eslint 8.1.7 
linter-ruby 1.2.5 
linter-ui-default 1.5.4 
merge-conflicts 1.4.5 
monokai 0.24.0 
phoenix-elixir-snippets 0.4.0 
platformio-ide-terminal 2.5.0 
process-palette 0.12.1 
rails-i18n-autocomplete 0.4.0 
rails-model-schema 0.9.0 
rails-transporter 1.6.5 
react-native-snippets 0.3.0 
recent-files-fuzzy-finder 0.3.2 
relative-numbers 0.8.0 
ruby-slim 0.2.0 
ruby-test 1.0.2 
spaces-in-braces 0.1.0 
split-diff 1.4.0 
tabs-to-spaces 1.0.3 
vim-mode-plus 0.92.1 
vim-mode-plus-ex-mode 0.9.0 
vim-mode-plus-keymaps-for-surround 0.2.1 
Cxarli commented 7 years ago

Did you have any file open or not?

eatobin commented 7 years ago

I had the same problem. I had one file open at the time. Thanks.

ankimichael commented 7 years ago

Running into the same issue. Specifically it was I am trying to run errorMatch using the named group "absFile".

I get the error with all files closed as well as open.

noseglid commented 7 years ago

Is this still an issue?

johnschultz commented 7 years ago

Just got this error when trying to test an elixir project. Atom: 1.20.1 x64 Electron: 1.6.9 OS: Mac OS X 10.12.5 Thrown From: build package 0.69.0

Stack Trace

Uncaught TypeError: Path must be a string. Received undefined

At path.js:7

TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.isAbsolute (path.js:1200:5)
    at normalizePath (/packages/build/lib/linter-integration.js:21:30)
    at /packages/build/lib/linter-integration.js:36:17
    at Array.map (native)
    at Linter.processMessages (/packages/build/lib/linter-integration.js:32:38)
    at /packages/build/lib/build.js:196:36)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:885:16)
    at Socket.<anonymous> (internal/child_process.js:334:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

Commands

  6x -0:21 core:close (div.tool-panel.tree-view)

Non-Core Packages

atom-elixir 0.2.3 
build 0.69.0 
build-elixir 0.7.0 
busy-signal 1.4.3 
elixir-alphabetize 0.3.0 
elixir-cmd 0.2.9 
elixir-pry 1.0.0 
go-debug 1.5.2 
go-plus 5.5.5 
go-signature-statusbar 1.2.3 
hyperclick 0.1.5 
intentions 1.1.5 
jekyll 2.1.0 
language-elixir 0.20.3 
language-haml 0.25.2 
language-liquid 0.6.0 
linter 2.2.0 
linter-ui-default 1.6.10 
vim-mode-plus 1.8.2 
jhbrown94 commented 6 years ago

I can reproduce. Problem seems to be certain warnings that ErrorMatcher matches without assigning a file: field. The warning shown here is sufficient:

> mix test
Compiling 28 files (.ex)
warning: Plug.Conn.WrapperError.reraise/3 is deprecated. Use reraise/1 or reraise/4 instead.
Found at 2 locations:
  lib/inzy_web/router.ex:4
  lib/inzy_web/router.ex:12

Here is what the problem ErrorMatcher looks like in the debugger -- note that object 5 has no file: field.
image

idleberg commented 6 years ago

Problem seems to be certain warnings that ErrorMatcher matches without assigning a file: field.

I can confirm this. Would be great if build would use the active file as fallback when no file field is provided.