【发布时间】:2022-01-11 19:16:03
【问题描述】:
我向 Vercel 部署了一个使用 firebase 的 React 应用。构建以状态码 1 退出。 我已经使用:“npm install firebase”安装了firebase,它在本地环境中运行良好。可能的错误是什么?
Creating an optimized production build...
Failed to compile.
./src/firebase.js
Cannot find module: 'firebase'. Make sure this package is installed.
You can install this package by running: npm install firebase.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! neozon@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appname@0.1.0 build 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! /vercel/.npm/_logs/2022-01-11T18_49_38_751Z-debug.log
Error: Command "npm run build" exited with 1
【问题讨论】: