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 SyntaxError: Invalid or unexpected token #505

Closed Manur94 closed 7 years ago

Manur94 commented 7 years ago

[Enter steps to reproduce:]

  1. open arduino example file, with the platformio-IDE packaga
  2. Try to build it, but error occurs.

Atom: 1.14.4 x64 Electron: 1.3.13 OS: Microsoft Windows 10 Home Thrown From: build package 0.67.0

Stack Trace

Uncaught SyntaxError: Invalid or unexpected token

At C:\Users\manu_\AppData\Local\atom\app-1.14.4\resources\app.asar\src\native-compile-cache.js:82

SyntaxError: Invalid or unexpected token
    at Module._compile (/app.asar/src/native-compile-cache.js:79:40)
    at /app.asar/src/compile-cache.js:216:21)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (/app.asar/src/native-compile-cache.js:50:27)
    at Object.startNewBuild (/packages/build/lib/build.js:106:24)
    at /packages/build/lib/build.js:270:14
    at saveAndContinue (/packages/build/lib/build.js:277:7)
    at Object.doSaveConfirm (/packages/build/lib/build.js:281:7)
    at Object.build (/packages/build/lib/build.js:264:10)
    at /packages/build/lib/build.js:64:62)
    at emitOne (events.js:96:13)
    at TargetManager.emit (events.js:188:7)
    at /packages/build/lib/target-manager.js:113:125)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at Object.runAtomCommand (/packages/platformio-ide/lib/utils.js:127:24)
    at /packages/platformio-ide/lib/main.js:193:30)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:259:29)
    at CommandRegistry.handleCommandEvent (/app.asar/src/command-registry.js:3:59)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/app.asar/src/command-registry.js:160:19)
    at executeCallback (/packages/tool-bar/lib/tool-bar-button-view.js:105:19)
    at ToolBarButtonView._onClick (/packages/tool-bar/lib/tool-bar-button-view.js:69:7)

Commands

     -8:49.5.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -8:27.2.0 platformio-ide:target:build (input.hidden-input)
     -8:27.2.0 platformio-ide:initialize-new-project (input.hidden-input)
     -8:03.9.0 application:add-project-folder (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -8:00.3.0 platformio-ide:project-examples (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  2x -7:53.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -7:32.8.0 platformio-ide:target:build (ol.tree-view.full-menu.list-tree.has-collapsable-children.focusable-panel)
     -7:32.8.0 platformio-ide:target:build-C:\Users\manu_\AppData\Local\Temp\arduino-blink-11728-512-7vxb6h.nf1ni5dn29 (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
     -0:16.3.0 platformio-ide:maintenance.rebuild-index (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
     -0:07.4.0 platformio-ide:target:build (input.hidden-input)
     -0:07.4.0 platformio-ide:target:build-C:\Users\manu_\AppData\Local\Temp\arduino-blink-11728-512-7vxb6h.nf1ni5dn29 (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)

Non-Core Packages

autocomplete-clang 0.10.0 
build 0.67.0 
busy 0.7.0 
file-icons 2.0.17 
language-ini 1.18.0 
linter 1.11.23 
linter-gcc 0.7.1 
minimap 4.26.8 
platformio-ide 1.7.3 
platformio-ide-terminal 2.4.0 
tool-bar 1.0.1 
Manur94 commented 7 years ago

Has anybody had this similar problem, or knows how to resolve this? i guess it has to do with atom itself, because the error is linked to a file in the program files of atom.

noseglid commented 7 years ago

You're getting an error when a bundled file is required. Apparently it thinks it has a syntax error. My guess is something went wrong during installation and the file wasn't transpiled correctly.

Please try and re-install.

Manur94 commented 7 years ago

hey, thanks for the reply. i already tried to reinstalled it several times (without anti-virus). would you have a suggestion as to what i can try differently for a reinstall? thanks

noseglid commented 7 years ago

No sorry. I'm fairly sure this doesn't relate to the build package, but rather to how atom parsed the files. I'd suggest posting an issue there, or the forums which might have quicker response times.