好的,所以有很多与此错误和电子相关的问题。但就像其他人一样,我的情况很独特。因此,当我尝试运行 npm start
时,它引发了以下问题:
/home/MYNAME/myCode/Code1/node_modules/electron/dist/electron: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! Code1@1.0.0 start: `electron .`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the Code1@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/MYNAME/.npm/_logs/2021-03-09T00_43_07_133Z-debug.log
有趣的部分是:
/home/MYNAME/myCode/Code1/node_modules/electron/dist/electron: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
无法加载库!那么有什么办法可以解决这个问题吗?