Vscode-eslint: eslint extension keep crashing in a project created by vue-cli 3

Created on 26 Feb 2019  路  7Comments  路  Source: microsoft/vscode-eslint

eslint extension keep crashing in a project created by vue-cli 3, while yarn run lint works well.

download this repository, open in vscode, install dependences (yarn), reload vscode, go to src/main.js, then eslint extension will crash immediately

step to reproduce

  1. create a project with vue-cli 3, Check these configurations: CSS Pre-processors , Sass/SCSS (with dart-sass), ESLint + Airbnb config

  2. go to src/main.js, change import App from './App.vue;' to import App from '@/App.vue'; (webpack alias), or import a nonexistent file, like import './somefile', eslint extension will crash immediately

  3. no this problem when using node-sass instead of dart-sass

versions

vscode-eslint: 1.8.0

vscode: 1.31.1

eslint: 5.14.1

node: v8.11.3

error info:

...

[Info  - 11:49:42 AM] ESLint library loaded from: /Users/project-path/node_modules/eslint/lib/api.js
dyld: lazy symbol binding failed: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
  Referenced from: /Users/project-path/node_modules/fibers/bin/darwin-x64-64/fibers.node
  Expected in: flat namespace

dyld: Symbol not found: __ZN2v816FunctionTemplate3NewEPNS_7IsolateEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEENS_5LocalIS4_EENSA_INS_9SignatureEEEiNS_19ConstructorBehaviorENS_14SideEffectTypeE
  Referenced from: /Users/project-path/node_modules/fibers/bin/darwin-x64-64/fibers.node
  Expected in: flat namespace

[Info  - 11:49:46 AM] Connection to server got closed. Server will restart.

...
needs more info

Most helpful comment

@wouterkroes
run which node in the terminal, you will get a path to the node executable in your system.
ps: eslint.runtime setting is for vscode

same issue #543

All 7 comments

This is caused by a native node module that you are using. In this case you need to tell ESLint to use the same node runtime to load the native module. This can be done using the eslint.runtime setting.

Let me know if this works for you?

Thanks a lot, it works for me馃槃

@dbaeumer @zliy I am having the same issue.

What exactly should I use as value for runtime?

{
    "eslint.runtime": ?
}

@wouterkroes
run which node in the terminal, you will get a path to the node executable in your system.
ps: eslint.runtime setting is for vscode

same issue #543

Is there a way to set VS Code to automatically use the currently selected Node.js version as selected by NVM?

IMO

{
    'eslint.runtime": "node"
}

should do the trick.

IMO

{
    'eslint.runtime": "node"
}

should do the trick.

So simple! It worked, thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JonathanWolfe picture JonathanWolfe  路  3Comments

Jamesernator picture Jamesernator  路  5Comments

wmertens picture wmertens  路  7Comments

zaggino picture zaggino  路  6Comments

lstrzebinczyk picture lstrzebinczyk  路  6Comments