Reactjs React无法静态计算fs参数
老实说,我不太确定发生了什么事。第二天我回来运行npm run dev client(parcel client/src/index.html)并获得以下日志:Reactjs React无法静态计算fs参数,reactjs,firebase-admin,Reactjs,Firebase Admin,老实说,我不太确定发生了什么事。第二天我回来运行npm run dev client(parcel client/src/index.html)并获得以下日志: Server running at http://localhost:1234 ‼ C:\Users\Tyler\Projects\React JS\project\node_modules\firebase-admin\lib\firebase-namespace.js:205:77: Cannot statically evalu
Server running at http://localhost:1234
‼ C:\Users\Tyler\Projects\React JS\project\node_modules\firebase-admin\lib\firebase-namespace.js:205:77: Cannot statically evaluate fs argument
203 | }
204 | try {
> 205 | var contents = config.startsWith('{') ? config : fs.readFileSync(config, 'utf8');
| ^
206 | return JSON.parse(contents);
207 | }
208 | catch (error) {
‼ Could not load existing sourcemap of "../../node_modules/@google-cloud/firestore/build/src/index.js".
‼ C:\Users\Tyler\Projects\React JS\project\node_modules\firebase-admin\lib\auth\credential.js:133:65: Cannot statically evaluate fs argument
131 | ServiceAccount.fromPath = function (filePath) {
132 | try {
> 133 | return new ServiceAccount(JSON.parse(fs.readFileSync(filePath, 'utf8')));
| ^
134 | }
135 | catch (error) {
136 | // Throw a nicely formed error message if the file contents cannot be parsed
‼ C:\Users\Tyler\Projects\React JS\project\node_modules\firebase-admin\lib\auth\credential.js:244:63: Cannot statically evaluate fs argument
242 | RefreshToken.fromPath = function (filePath) {
243 | try {
> 244 | return new RefreshToken(JSON.parse(fs.readFileSync(filePath, 'utf8')));
| ^
245 | }
246 | catch (error) {
247 | // Throw a nicely formed error message if the file contents cannot be parsed
‼ C:\Users\Tyler\Projects\React JS\project\node_modules\firebase-admin\lib\auth\credential.js:337:35: Cannot statically evaluate fs argument
335 | var fileText;
336 | try {
> 337 | fileText = fs.readFileSync(filePath, 'utf8');
| ^
338 | }
339 | catch (error) {
340 | if (ignoreMissing) {
抛出此错误后,执行立即退出。我猜这可能与我提供的firebase管理员配置有关,但我仔细检查了一下,这似乎不是问题所在
任何帮助都将不胜感激