gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 83 forks source link

Uncaught TypeError: Cannot read property 'code' of undefined #534

Closed cnjimbo closed 4 years ago

cnjimbo commented 4 years ago

[Enter steps to reproduce:]

  1. It works well when depending babel-core 6+
  2. upgrade the babel to @babel/core 7+, there is the following issue

Atom: 1.45.0 x64 Electron: 4.2.7 OS: Unknown Windows version Thrown From: language-babel package 2.85.0

Stack Trace

Uncaught TypeError: Cannot read property 'code' of undefined

At C:\Users\tangj15\.atom\packages\language-babel\lib\transpiler.coffee:215

TypeError: Cannot read property 'code' of undefined
    at /packages/language-babel/lib/transpiler.coffee:215:65
    at ~/AppData/Local/atom/app-1.45.0/resources/app/static/<embedded>:14:43875
    at ~/AppData/Local/atom/app-1.45.0/resources/app/static/<embedded>:14:43716
    at Function.simpleDispatch (~/AppData/Local/atom/app-1.45.0/resources/app/static/<embedded>:11:1214120)
    at Emitter.emit (~/AppData/Local/atom/app-1.45.0/resources/app/static/<embedded>:11:1215561)
    at ChildProcess.<anonymous> (~/AppData/Local/atom/app-1.45.0/resources/app/static/<embedded>:14:42817)
    at ChildProcess.emit (events.js:182:13)
    at emit (internal/child_process.js:812:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Commands

     -0:24.2.0 refactor:done (input.hidden-input)
     -0:24.2.0 docblockr:parse-enter (input.hidden-input)
     -0:24.2.0 editor:newline (input.hidden-input)
     -0:24 intentions:highlight (input.hidden-input)
     -0:23.8.0 core:save (input.hidden-input)

Non-Core Packages

atom-beautify 0.33.4 
atom-ide-datatip 0.11.4 
atom-ide-definitions 0.3.4 
atom-ide-markdown-service 1.2.4 
atom-ide-outline 1.2.2 
atom-ide-ui 0.13.0 
atom-ide-vue 1.3.1 
atom-live-server-plus 3.0.1 
atom-material-ui 2.1.3 
atom-math 0.0.9 
atom-package-sync 0.4.0 
atom-select-npm-install 1.0.2 
atom-sync 0.7.3 
atom-ternjs 0.20.0 
atom-twitter-client 0.4.5 
atom-typescript 13.5.1 
autoclose-html 0.23.0 
autocomplete-modules 2.3.0 
autocomplete-paths 2.12.2 
busy-signal 2.0.1 
case-keep-replace 0.6.2 
color-picker 2.3.0 
command-toolbar 1.0.12 
command-webui 0.1.6 
commands 0.0.1 
console-command-runner 1.1.0 
copy-path 0.5.1 
debug 0.0.1 
docblockr 0.13.7 
duplicate-line-or-selection 0.9.0 
editorconfig 2.6.0 
emmet 2.4.3 
emmet-jsx-css-modules 1.0.0 
es6-javascript 1.0.0 
execute-command 1.3.0 
file-icons 2.1.40 
gist-it 0.9.2 
git-control 0.9.0 
git-plus 8.7.1 
hey-pane 1.2.0 
highlight-selected 0.17.0 
Hydrogen 2.14.1 
hyperclick 0.0.0 
ide-css 0.3.4 
ide-html 0.6.0 
ide-json 0.2.1 
ide-typescript 0.9.1 
ide-vue 0.1.9 
ide-yaml 0.7.0 
intentions 1.1.5 
ivue 0.2.5 
js-hyperclick 1.19.0 
js-refactor 0.8.1 
js-refactor-atom 0.10.1 
language-babel 2.85.0 
language-diff 0.7.0 
language-html-babel 0.49.2 
language-postcss 1.3.1 
language-vue 0.26.0 
language-vue-component 0.5.0 
language-vuetify 0.3.0 
linter 2.3.1 
linter-eslint 8.5.5 
linter-ui-default 1.8.1 
local-history 4.3.1 
local-settings 0.4.1 
minimap 4.29.9 
minimap-highlight-selected 4.6.1 
npm-install 4.0.4 
npm-outdated 0.6.0 
npm-plus 0.4.0 
open-in-atom-pkg 1.0.1 
package-sync 1.1.0 
pigments 0.40.2 
prettier-atom 0.58.2 
pretty-json 2.1.2 
project-manager 3.3.8 
quick-log 0.3.1 
refactor 0.11.5 
regex-railroad-diagram 0.19.4 
related 0.3.5 
script 3.25.0 
scroll-sync 0.2.4 
scroll-through-time 0.3.1 
set-syntax 0.4.0 
sort-lines 0.19.0 
source-preview 0.5.3 
Sublime-Style-Column-Selection 1.7.5 
sync-settings 4.3.2 
tab-foldername-index 3.3.1 
teletype 0.13.4 
toggle-quotes 1.1.4 
tree-view-copy-relative-path 1.2.0 
tree-view-git-status 1.5.3 
vue-fmt 0.1.1 
vue-template-beautify 0.1.2 
cnjimbo commented 4 years ago

upgrading the babel version via npx babel update is well now