JSON 运行 对本机应用程序与 expo 作出反应时出错

JSON error when running react native app with expo

当我尝试 运行 我在世博会上用 expo start 反应本机应用程序时,它会记录二维码,但一段时间后也会记录此错误:

Failed to construct transformer: Error: Ca
nnot parse /home/runner/kitsu-mobile-1/.nvm
/test/fast/Unit tests/mocks/project_dirs/ne
sted-both/package.json as JSON: Unexpected
end of JSON input
at Object.<anonymous> (/home/runner/kit
su-mobile-1/node_modules/metro/node_modules
/jest-haste-map/build/worker.js:167:15)
...

因为那个错误,我用 phone 扫描二维码后无法连接。

我正在使用:

如有任何帮助,我将不胜感激。

很晚才回答,但似乎我们是唯一出现此错误的 2 个。

如果将出现此错误的package.json填入{},则错误消失!