AtomLinter / linter-gcc

Atom-linter extension to lint C/C++ source files using gcc/g++
Other
71 stars 21 forks source link

Uncaught Error: Cannot find module '.gcc-flags.json' #156

Open pradiptlx opened 6 years ago

pradiptlx commented 6 years ago

Atom: 1.23.1 x64 Electron: 1.6.15 OS: Ubuntu 16.04.3 Thrown From: linter-gcc package 0.7.1

Stack Trace

Uncaught Error: Cannot find module '.gcc-flags.json'

At /usr/share/atom/resources/app/static/<embedded>:1

Error: Cannot find module '.gcc-flags.json'
    at Module._resolveFilename (module.js:470:15)
    at Module._resolveFilename (/usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.get_Module._resolveFilename (/usr/share/atom/resources/app/src/module-cache.js:354:58)
    at Module.require (/app.asar/static/index.js:40:43)
    at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33)
    at Object.module.exports.settings (/packages/linter-gcc/lib/config.js:49:25)
    at Object.buildCommand (/packages/linter-gcc/lib/utility.js:127:23)
    at Object.lint (/packages/linter-gcc/lib/main.js:110:36)
    at /packages/linter-gcc/lib/main.js:180:26

Commands

 12x -0:21.4.0 core:page-down (input.hidden-input)
  4x -0:20.2.0 core:page-up (input.hidden-input)
     -0:19.2.0 intentions:highlight (input.hidden-input)
     -0:19 core:close (input.hidden-input)
     -0:13.8.0 tree-view:remove-project-folder (span.name.icon.icon-file-directory)
     -0:13.8.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-atom-material-syntax.theme-atom-material-ui)
     -0:12.4.0 application:new-file (atom-pane.pane.active)
     -0:10.7.0 grammar-selector:show (input.hidden-input)
     -0:10.2.0 core:confirm (input.hidden-input)

Non-Core Packages

apex-ui 1.0.2 
atom-beautify 0.30.9 
atom-clock 0.1.15 
atom-material-syntax 1.0.8 
atom-material-syntax-dark 1.0.0 
atom-material-ui 2.0.6 
autocomplete-clang 0.11.4 
build 0.70.0 
busy-signal 1.4.3 
chester-atom-syntax 0.3.0 
file-icons 2.1.15 
intentions 1.1.5 
language-ini 1.19.0 
linter 2.2.0 
linter-gcc 0.7.1 
linter-ui-default 1.6.10 
minimap 4.29.7 
monokai 0.24.0 
nucleus-dark-ui 0.12.3 
platformio-ide 2.0.0-rc.5 
platformio-ide-debugger 1.2.5 
platformio-ide-terminal 2.8.0 
pristine-ui 1.1.11 
pure-syntax 0.3.0 
seti-syntax 1.1.3 
seti-ui 1.9.0 
toggler 0.3.1 
tool-bar 1.1.0 
pradiptlx commented 6 years ago

I think after i install platformio, its breaks the linter, but i dont understand why

pradiptlx commented 6 years ago

This bug still present if i create a new file and set to C or C++ and then type something, the error appears. Before install platformio, it didn't happen

EDIT: the error is not present if i save file to .c or .cpp.

This is console log when i didn't save file before but change language to C directly.

<embedded>:1 Uncaught Error: Cannot find module '.gcc-flags.json' at Module._resolveFilename (module.js:470:15) at Module._resolveFilename (/usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35:12) at Function.get_Module._resolveFilename (/usr/share/atom/resources/app/src/module-cache.js:354:58) at Module.require (file:///usr/share/atom/resources/app.asar/static/index.js:40:43) at require (/usr/share/atom/resources/app/src/native-compile-cache.js:66:33) at Object.module.exports.settings (/home/prdpt/.atom/packages/linter-gcc/lib/config.js:49:25) at Object.buildCommand (/home/prdpt/.atom/packages/linter-gcc/lib/utility.js:127:23) at Object.lint (/home/prdpt/.atom/packages/linter-gcc/lib/main.js:110:36) at /home/prdpt/.atom/packages/linter-gcc/lib/main.js:180:26 Module._resolveFilename @ module.js:470 Module._resolveFilename @ /usr/share/atom/resources/electron.asar/common/reset-search-paths.js:35 get_Module._resolveFilename @ <embedded>:12240 Module.require @ index.js:40 require @ <embedded>:11585 module.exports.settings @ /home/prdpt/.atom/packages/linter-gcc/lib/config.js:49 buildCommand @ /home/prdpt/.atom/packages/linter-gcc/lib/utility.js:127 lint @ main.js [sm]:110 (anonymous) @ main.js [sm]:180 setTimeout (async) lintOnTheFly @ main.js [sm]:173 module.exports.Emitter.simpleDispatch @ <embedded>:65891 module.exports.Emitter.emit @ <embedded>:66007 module.exports.TextBuffer.emitDidStopChangingEvent @ <embedded>:34317 later @ <embedded>:78443 setTimeout (async) (anonymous) @ <embedded>:78449 module.exports.TextBuffer.emitDidChangeTextEvent @ <embedded>:34294 module.exports.TextBuffer.transact @ <embedded>:33582 transact @ <embedded>:4142 mergeIntersectingSelections @ <embedded>:3689 mergeSelections @ <embedded>:5525 mergeIntersectingSelections @ <embedded>:5496 mutateSelectedText @ <embedded>:3688 insertText @ <embedded>:3654 object.(anonymous function) @ <embedded>:17476 didTextInput @ <embedded>:8573

And this is when i save first then edit something. /home/prdpt/.atom/packages/linter-gcc/lib/config.js:43 linter-gcc: Using configuration page settings