ijsKoud / PaperPlane

An open-source customisable solution to storing files in the cloud. ✈️
https://paperplane.ijskoud.dev
MIT License
8 stars 2 forks source link

Install Script Error #112

Closed Mazeee1 closed 2 years ago

Mazeee1 commented 2 years ago

Hello, it's me again :) I'm getting this error when I run the node scripts/install command when installing PaperPlane.

[INFO] - Installing the required dependencies...
[INFO] - Building web application...
[ERROR] - An error occured while building the web application, please try again.
later Error: Command failed: yarn build
Failed to compile.

./src/lib/hooks/useAuth.tsx:1:15
Type error: Module '"@prisma/client"' has no exported member 'User'.

> 1 | import type { User } from "@prisma/client";
    |               ^
  2 | import React, { useState, useContext, createContext, useEffect } from "react";
  3 | import { fetch, getCancelToken } from "../fetch";
  4 |

    at ChildProcess.exithandler (node:child_process:398:12)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1092:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: 'yarn build'
}

Not sure whether it's a problem with my VPS, because this hasn't happened before. Strange.

ijsKoud commented 2 years ago

Hey, it's indeed weird that you receive this error now. I haven't received it before either. Can you try running yarn prisma:generate and after that node scripts/install

Mazeee1 commented 2 years ago

Thanks, that worked, but now it's now coming up with this error when I try to login: image image

The first one comes up when you load the page, and the second one when you click the login button. I forgot to add the .env file the first time, but I added it and used the --update-env on the end of the pm2 restart command.

I also made sure that the encryption key matched the format you said to use last time, and it still won't work.

ijsKoud commented 2 years ago

there is a /undefined/ in your URL, I believe that's caused by a misconfigured domain in the .env file, you will have to add NEXT_PUBLIC_DOMAIN="https://cdn.mazeee.xyz" to the .env file in order for it to work.

Mazeee1 commented 2 years ago

After some experimenting I think it was due to the new Ubuntu version. I created a new VPS with 21.10, and it worked fine, no problems. I had put that line in the .env file, so it was strange that it was doing that.

Anyway it works, so I'm going to stop doing anything else before I break it again Thanks for your help :)