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
create a project with vue-cli 3, Check these configurations: CSS Pre-processors , Sass/SCSS (with dart-sass), ESLint + Airbnb config
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
no this problem when using node-sass instead of dart-sass
vscode-eslint: 1.8.0
vscode: 1.31.1
eslint: 5.14.1
node: v8.11.3
...
[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.
...
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.
Most helpful comment
@wouterkroes
run
which nodein the terminal, you will get a path to the node executable in your system.ps:
eslint.runtimesetting is for vscodesame issue #543