AtomLinter / linter-eslint

ESLint plugin for Atom Linter
https://atom.io/packages/linter-eslint
584 stars 140 forks source link

Bug on Upgrade to 8.2.0 #920

Closed hafley66 closed 7 years ago

hafley66 commented 7 years ago

Issue Type

Bug

Issue Description

Simply updated and it broke.

Bug Checklist

Linter Eslint: Debug output here

I can't even get that to come up in the commands menu.

[Enter steps to reproduce:]

  1. Uninstall
  2. Reinstall

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.11.6 Thrown From: linter-eslint package 8.2.0

Stack Trace

Failed to activate the linter-eslint package

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.17.0 x64 Electron: 1.3.15 OS: Mac OS X 10.11.6 Thrown From: linter-eslint package 8.2.0

Stack Trace

Failed to activate the linter-eslint package

At regeneratorRuntime is not defined

ReferenceError: regeneratorRuntime is not defined
    at /packages/linter-eslint/main.js:35:7
    at /packages/linter-eslint/main.js:35:7)
    at Module.get_Module._compile (/Applications/Atom.app/Contents/Resources/app/src/native-compile-cache.js:106:1)
    at Object.value [as .js] (/Applications/Atom.app/Contents/Resources/app/src/compile-cache.js:230:1)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (Applications/Atom.app/Contents/Resources/app/static/index.js:47:45)
    at require (internal/module.js:20:19)
    at customRequire (/Applications/Atom.app/Contents/Resources/app/static/<embedded>:73:1)
    at Package.module.exports.Package.requireMainModule (/Applications/Atom.app/Contents/Resources/app/src/package.js:887:1)
    at Package.module.exports.Package.activateNow (/Applications/Atom.app/Contents/Resources/app/src/package.js:242:1)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:225:1
    at Package.module.exports.Package.measure (/Applications/Atom.app/Contents/Resources/app/src/package.js:99:1)
    at /Applications/Atom.app/Contents/Resources/app/src/package.js:218:1
    at Package.module.exports.Package.activate (/Applications/Atom.app/Contents/Resources/app/src/package.js:215:1)
    at PackageManager.module.exports.PackageManager.activatePackage (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:642:1)
    at /Applications/Atom.app/Contents/Resources/app/src/package-manager.js:623:1
    at Config.module.exports.Config.transactAsync (/Applications/Atom.app/Contents/Resources/app/src/config.js:346:1)
    at PackageManager.module.exports.PackageManager.activatePackages (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:618:1)
    at PackageManager.module.exports.PackageManager.activate (/Applications/Atom.app/Contents/Resources/app/src/package-manager.js:600:1)
    at /Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:832:1

Commands

Non-Core Packages

aligner 1.2.0 
aligner-javascript 1.1.0 
aligner-ruby 1.6.0 
atom-beautify 0.29.24 
atom-ctags 5.1.0 
atom-jade 0.3.0 
auto-indent 0.5.0 
autocomplete-ctags 0.4.1 
autocomplete-modules 1.6.10 
busy-signal 1.4.1 
color-picker 2.2.5 
easy-motion-redux 1.1.1 
emmet 2.4.3 
erb-snippets 1.1.0 
flatland-dark 0.2.2 
flatland-dark-ui 0.2.5 
git-blame 1.1.1 
git-diff-details 1.4.0 
git-plus 7.9.2 
git-status 0.3.4 
git-time-machine 1.5.9 
highlight-selected 0.13.1 
indent-guide-improved 1.4.12 
intentions 1.1.2 
jade-beautify 0.1.5 
keybinding-cheatsheet 0.1.1 
keyboard-scroll 0.7.0 
keyboard-sounds 0.2.0 
language-babel 2.62.0 
language-docker 1.1.7 
language-gherkin 1.0.4 
language-jade 0.7.2 
language-javascript-jsx 0.3.7 
language-pug 0.0.21 
language-slim 0.5.0 
language-vue 0.21.2 
language-vue-component 0.5.0 
linter 2.1.4 
linter-eslint 8.2.0 
linter-ui-default 1.6.0 
recent-files-fuzzy-finder 0.3.2 
ruby-block 0.3.6 
ruby-blue-syntax 0.2.2 
ruby-navigator 0.5.0 
ruby-slim 0.2.0 
symbols-tree-view 0.14.0 
tree-view-autoresize 2.0.0 
Arcanemagus commented 7 years ago

It looks like for some reason your Atom install isn't properly transcoding the files into a usable format, investigating...

hafley66 commented 7 years ago

It is much appreciated. For now I'm going to run eslint-watch from command line

hafley66 commented 7 years ago

Downgraded to 8.0.0 and it worked, will try again another time.

Arcanemagus commented 7 years ago

Can you try this?

  1. Close all instances of Atom
  2. Delete the ~/.atom/compile-cache/package-transpile/linter-eslint folder
  3. apm uninstall linter-eslint; apm install linter-eslint (just in case)
4cm4k1 commented 7 years ago

For what it's worth, @Arcanemagus & @hafley66, it’s possible the issue is being caused by a .babelrc file somewhere up the file tree messing with transpilation during install, as noted in https://github.com/AtomLinter/linter-eslint/pull/890. For me, that’s in ~. At various points, Atom/linter-eslint were not finding the preset env relative to ~ or that regeneratorRuntime was not defined. My .babelrc file is as follows:

{
  "presets": [
    ["env", {
      "targets": {
        "chrome": "current",
        "node": "current",
        "uglify": true
      },
      "useBuiltIns": true
    }]
  ]
}

I was able to install it successfully by temporarily removing ~/.babelrc. Perhaps there’s a way to check for it in the user’s home directory before proceeding with installation?

Arcanemagus commented 7 years ago

Hmmmm, very interesting.

Unfortunately if we bundle a .babelrc with the project to override the one it is picking up for you, we would just be bringing the reverse problem (#796) back into play.

@binarymuse is there anything we can do to force the babel instance Atom is using to transpile the project into not searching for a configuration?

BinaryMuse commented 7 years ago

I think that adding "babelrc": false to the package's Babel config will stop this behavior. See https://babeljs.io/docs/usage/babelrc/#lookup-behavior for more.

I think in older versions of Babel this was perhaps default? I know it at least went by a different config name.

Arcanemagus commented 7 years ago

v8.2.1 released which should fix this, thanks for everyone that reported and tracked this down!

4cm4k1 commented 7 years ago

I’ve verified that this works with v8.2.1 with my ~/.babelrc!

hafley66 commented 7 years ago

Thank you all so much! Its working for me now on 8.2.1!