supermemoryai / supermemory

Build your own second brain with supermemory. It's a ChatGPT for your bookmarks. Import tweets or save websites and content using the chrome extension.
https://supermemory.ai
MIT License
7.04k stars 679 forks source link

Getting "Error: Failed to collect page data for /api/store/friend" when running a deploy #227

Closed kellemar closed 2 months ago

kellemar commented 2 months ago

I've been getting "Error: Failed to collect page data for /api/store/friend", whenever I try to run an "npm run deploy".

The configuration was done with the provided setup guide. I've retried a few times with a clean workspace, but this error always pops up during the deployment process.

Collecting page data ... ▲ ⚠ Using edge runtime on a page currently disables static generation for that page ▲ /Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-chunks/6677.js:3 ▲ ${e.content}).join(" "),o=await t.AI.run("@cf/meta/llama-3.1-8b-instruct",{messages:[{role:"system",content:"You are a model that suggests questions based on the user's content. you MUST suggest atleast 1 question to ask. AT MAX, create 3 suggestions. not more than that."},{role:"user",content:Run the function based on this input: ${r.slice(0,2e3)}}],tools:[{type:"function",function:{name:"querySuggestions",description:"Take the user's content to suggest some good questions that they could ask.",parameters:{type:"object",properties:{querySuggestions:{type:"array",description:"Short questions that the user can ask. Give atleast 3 suggestions. No more than 5.",items:{type:"string"}}},required:["querySuggestions"]}}}]});console.log("I RAN AN AI CALLS OWOWOWOWOW",JSON.stringify(o,null,2));let i=o.toolcalls?.[0]?.arguments?.querySuggestions;if(!i||0===i.length)return{success:!1,error:"Failed to get query suggestions"};return i.length>0&&await t.RECOMMENDATIONS.put(e.user.id,JSON.stringify(i),{expirationTtl:120}),{success:!0,data:i}}catch(e){return{success:!1,error:e.message,data:[]}}}(0,w.h)([m,,v,I,T,E,j,B,R,k,F,M,J,P,W,z]),(0,s.j)("11f19961d1559dd70b8d76f12b460ed52d17665b",m),(0,s.j)("ef8c1fd1a21c47e47d19e4414e5551764f4821dc",_),(0,s.j)("4533743194f46a1eec8b656b9ad09a6c9deba56a",v),(0,s.j)("93ce011ba163bc63385831812ae383a38163e5fa",I),(0,s.j)("48b1dda5c28f672547cc215a387e6dfdd55294a6",T),(0,s.j)("b04f2b49cd15f02fd088dd7f711807f3772927a1",E),(0,s.j)("310d8e5a1b9f82f4d6323f482a578c75b55e685c",j),(0,s.j)("7cb3a9f8fdaa488ec253cad0e37de8b8ccedf372",B),(0,s.j)("25865c65009bbe0bd0d320f18f5c1bc919373362",R),(0,s.j)("87c93cc9ddbaaa711e21a417c131e2c1270a7c3d",k),(0,s.j)("4180a4ac87cfd429cd9d00bf833a88e7823b4c00",F),(0,s.j)("51928833f285e9711d5f3302898da42d0833586d",M),(0,s.j)("a1f7eb3334525ac7f6f8130c26ac7d58745972e9",J),(0,s.j)("cbced9694fbcf78322c6dd8586a579d7d9093cd3",P),(0,s.j)("8fd8947bfbb72ae7e16fc02e99922e6d7b9fd6d7",W),(0,s.j)("50c96a67950ba14163cf1f6bf0370b04fb31bf1f",z)},32822:(e,t,a)=>{a.d(t,{b:()=>s});let s={page:100,tweet:1e3,note:1e3}},62643:(e,t,a)=>{a.r(t),a.d(t,{getMetaData:()=>n});var s=a(25391);a(33137);var r=a(10708);async function n(e){let t=await fetch(e),a=await t.text(),s=r.zD(a),n=s("title").text().trim(),c=s("meta[name=description]").attr("content")??"",o=s("link[rel=icon]").attr("href")??"https://supermemory.dhr.wtf/web.svg",i=o.trim().length>0?o.trim():"https://supermemory.dhr.wtf/web.svg";return i.startsWith("/")?i=e+i:i.startsWith("./")&&(i=e+i.slice(1)),{title:n,description:c,image:i,baseUrl:e}}(0,a(74126).h)([n]),(0,s.j)("9b3b25f052c5876e631cd9101ce7224881f8572a",n)},67058:(e,t,a)=>{function s(e){let t=0;for(let a=0;a<e.length;a++)t=(31t+e.charCodeAt(a))%1000000007;return t}a.d(t,{D:()=>i,u:()=>o});let r="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890",n=function(e,t){let a=e.length,s,r;for(;a;)r=Math.floor(c(t)a--),s=e[a],e[a]=e[r],e[r]=s,++t;return e}(r.split(""),s(process.env.BACKEND_SECURITY_KEY));function c(e){let t=1e4Math.sin(e++);return t-Math.floor(t)}let o=e=>{let t="";for(let a=0;a<e.length;a++)t+=n[r.indexOf(e[a])];return d(t)},i=e=>{let t="",a=Math.floor(c(s(process.env.BACKEND_SECURITY_KEY))(e.length/2));for(let a=0;a<e.length;a++)t+=r[n.indexOf(e[a])];let o=parseInt(e[a]),i=parseInt(e.slice(a+1,a+o+1));return t.slice(e.length-i)},d=(e,t=60)=>{let a=t-e.length;if(a<0)return e;let r=Math.floor(c(s(process.env.BACKEND_SECURITY_KEY))(t/2)),o=e.length.toString().length.toString()+e.length.toString(),i="",d=o.length+e.length;for(let e=0;e<a;e++)if(e==r)i+=o;else{if(d>=t)break;i+=n[Math.floor(c(Math.random())n.length)],d++}return i+e}},73918:(e,t,a)=>{a.d(t,{Z:()=>r,m:()=>s});let s=e=>Tweet from @${e.user?.name??e.user?.screen_name??"Unknown"}

TypeError: Cannot read properties of undefined (reading 'length') ▲ at s (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-chunks/6677.js:3:2693) ▲ at 67058 (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-chunks/6677.js:3:2962) ▲ at t (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-runtime-webpack.js:1:143) ▲ at 76677 (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-chunks/6677.js:1:787) ▲ at t (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-runtime-webpack.js:1:143) ▲ at 24393 (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/app/api/store/friend/route.js:1:1580) ▲ at t (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-runtime-webpack.js:1:143) ▲ at 61723 (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/app/api/store/friend/route.js:1:509) ▲ at t (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/edge-runtime-webpack.js:1:143) ▲ at t (/Users/alvindecruz/Code/supermemory/apps/web/.next/server/app/api/store/friend/route.js:1:9494) ▲ > Build error occurred ▲ Error: Failed to collect page data for /api/store/friend ▲ at /Users/alvindecruz/Code/supermemory/node_modules/.pnpm/next@14.2.5_@babel+core@7.24.9_@opentelemetry+api@1.9.0_react-dom@18.3.1_react@18.3.1/node_modules/next/dist/build/utils.js:1268:15 ▲ at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { ▲ type: 'Error' ▲ } ▲ ELIFECYCLE  Command failed with exit code 1. ▲ Error: Command "pnpm run build" exited with 1

Dhravya commented 2 months ago

Just delete those files for now :)