Closed jiradedm closed 3 months ago
Interesting, that seems to indicate that you're running Node.js + ESLint in x86_64
mode (maybe using Rosetta?)
@jiradedm do you have any idea why that would be?
I would suggest looking in to what program is running the shell that is running Node.js + ESLint - maybe that program is running in Rosetta mode and it should not be.
Eg. if that screenshot was in VS Code, maybe you have an "Intel Chip" VS Code version instead of the "Apple silicon" version?
I would definitely recommend changing all software to the Apple Silicon version - fewer compatibility problems and also a performance boost.
screenshots above use vscode "universal" without "open using rosetta" checked. then I tried "Apple Silicon" and still got the error. but the error gone when I opened vscode "universal" with "open using rosetta" checked.
Ahh then maybe it's the opposite error:
libpg-query
in node_modules
is the x86 version, which will fail if run with a non-Rosetta Node.js + ESLint environmentI guess the more permanent solution may be to delete node_modules
and reinstall with an Apple Silicon terminal environment.
I run command "arch" in my terminal (used in installing packages) and get "i386" (probaby config a long time ago) then run it in vscode terminal and get "arm64", so I run "exec arch -arm64 $SHELL" to change to arm64, then delete node_modules and package-lock.json then install package again but still get an error.
and I tried install packages via vscode terminal (assume it'll use the same environment) and still get an error
Sounds more like a setup issue rather than SafeQL's.
Try opening a new terminal, re-installing node modules and running ESLint (without opening vs code). I believe it should work as expected. In any case, The language service doesn't necessarily use the same arch as your default terminal arch.
I'm closing this issue for now due to inactivity.
Describe the bug eslint error
To Reproduce start eslint with @ts-safeql/eslint-plugin plugin on mac m2
Expected behavior start eslint without error
Screenshots
Desktop (please complete the following information):