Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deploy it on vercel? #43

Closed
ddy-ddy opened this issue Apr 13, 2023 · 2 comments
Closed

How to deploy it on vercel? #43

ddy-ddy opened this issue Apr 13, 2023 · 2 comments

Comments

@ddy-ddy
Copy link

ddy-ddy commented Apr 13, 2023

Hello! This project is very 👍
I want to know how to deploy it with vercel.
I fork your project, and create a project with vercel. but when I click deploy, there was many errors.

This is my deploy setting:

This is the error informations:

[22:57:21.186] Running build in San Francisco, USA (West) – sfo1
[22:57:21.257] Cloning github.com/ddy-ddy/my-personal-chatgpt (Branch: master, Commit: 1b19c0f)
[22:57:21.389] Previous build cache not available
[22:57:22.355] Cloning completed: 1.098s
[22:57:22.480] Running "vercel build"
[22:57:22.913] Vercel CLI 28.18.5
[22:57:23.468] Installing dependencies...
[22:57:36.361] 
[22:57:36.361] added 411 packages in 13s
[22:57:36.361] 
[22:57:36.361] 34 packages are looking for funding
[22:57:36.361]   run `npm fund` for details
[22:57:36.387] Detected `package-lock.json` generated by npm 7+...
[22:57:36.388] Running "npm run build"
[22:57:36.678] 
[22:57:36.679] > @shipbit/[email protected] build
[22:57:36.679] > vite build
[22:57:36.679] 
[22:57:37.536] 
[22:57:37.541] �[36mvite v4.2.1 �[32mbuilding SSR bundle for production...�[36m�[39m
[22:57:37.576] transforming...
[22:57:39.127] 
[22:57:39.127] �[1m�[33mwarn�[39m�[22m - As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.
[22:57:39.127] �[1m�[33mwarn�[39m�[22m - Remove it from the `plugins` array in your configuration to eliminate this warning.
[22:57:43.242] �[32m✓�[39m 831 modules transformed.
[22:57:43.259] 2:57:43 PM [vite-plugin-svelte] ssr compile done.
[22:57:43.259] package          	files	  time	   avg
[22:57:43.259] @shipbit/slickgpt	  645	 1.62s	 2.5ms
[22:57:43.259] @sveltejs/kit    	    1	24.4ms	24.4ms
[22:57:43.260] �[32m✓�[39m built in 5.72s
[22:57:43.260] �[31m"FIREBASE_APIKEY" is not exported by "�$env/static/private", imported by "src/misc/firebase.ts".�[39m
[22:57:43.260] file: �[36m/vercel/path0/src/misc/firebase.ts:4:1�[39m
[22:57:43.260] �[33m2: import { getDatabase, get, ref } from 'firebase/database';
[22:57:43.260] 3: import {
[22:57:43.260] 4:   FIREBASE_APIKEY,
[22:57:43.260]      ^
[22:57:43.260] 5:   FIREBASE_AUTHDOMAIN,
[22:57:43.260] 6:   FIREBASE_PROJECTID,�[39m
[22:57:43.262] �[31merror during build:
[22:57:43.263] RollupError: "FIREBASE_APIKEY" is not exported by "�$env/static/private", imported by "src/misc/firebase.ts".
[22:57:43.263]     at error (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:2105:30)
[22:57:43.263]     at Module.error (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:13174:16)
[22:57:43.263]     at Module.traceVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:13559:29)
[22:57:43.263]     at ModuleScope.findVariable (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:12061:39)
[22:57:43.263]     at Identifier.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:7933:40)
[22:57:43.263]     at CallExpression.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:5722:28)
[22:57:43.263]     at CallExpression.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:9470:15)
[22:57:43.263]     at ExpressionStatement.bind (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:5726:23)
[22:57:43.264]     at Module.bindReferences (file:///vercel/path0/node_modules/rollup/dist/es/shared/node-entry.js:13170:18)�[39m
[22:57:43.294] Error: Command "npm run build" exited with 1
[22:57:43.657] Deployment completed
[22:57:43.613] BUILD_UTILS_SPAWN_1: Command "npm run build" exited with 1
@Shackless
Copy link
Contributor

Hi @ddy-ddy and thanks for the flowers. See #6 (comment) for what you have to do.

In short:

  • Firebase is needed for the Share feature and requires some env vars setup on Vercel
  • you can either create your own Firebase Realtime database and supply your real keys OR
  • you can supply some dummy vars to get rid of the build errors and then ignore or comment out the UI features regarding Share because it won't work of course.

@ddy-ddy
Copy link
Author

ddy-ddy commented Apr 14, 2023

Thank you so much✌🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants