macbook m1 pro 使用 Vue Devtools 遇到的问题
问题1 The editor process exited with an error: (code 255).
'/Applications/WebStorm.app/Contents/jbr/Contents/MacOS/libjli.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/libjli.dylib' (no such file), NSBundlePath=/Applications/WebStorm.app/Contents/jbr, NSLocalizedDescription=The bundle “OpenJDK 11.0.13” couldn’t be loaded because it doesn’t contain a version for the current architecture.}
Could not open VFilter.vue in the editor.
The editor process exited with an error: (code 255).
To specify an editor, specify the EDITOR env variable or add "editor" field to your Vue project config.
报错的关键信息是 (have ‘arm64’, need ‘x86_64’) ,需要安装arm版本的node,将node切换到v16.19.0就可以正常运行了
问题2
macbook m1 pro 同时安装了idea和webstorm, 分别运行后端和前端项目,使用Vue Devtools跳转到源码页面,插件默认使用idea打开前端源码,应该用webstorm打开。
解决方式:在.env.development文件中指定用webStrom打开LAUNCH_EDITOR='/Applications/WebStorm.app/Contents/MacOS/webstorm'