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

Unable to deploy on vercel #2

Closed
Moemen02 opened this issue Apr 2, 2024 · 4 comments
Closed

Unable to deploy on vercel #2

Moemen02 opened this issue Apr 2, 2024 · 4 comments

Comments

@Moemen02
Copy link

Moemen02 commented Apr 2, 2024

So Im trying to host my nuxt 3 monorepo on vercel, but it won't work. Don't know why.

This is the output im getting:

[02:02:59.387] Running build in Washington, D.C., USA (East) – iad1
[02:02:59.588] Cloning github.com/Moemen02/freshnez-mono-repo (Branch: main, Commit: 194523f)
[02:02:59.999] Previous build cache not available
[02:03:00.399] Cloning completed: 811.427ms
[02:03:01.128] Running "vercel build"
[02:03:02.127] Vercel CLI 33.6.2
[02:03:03.306] Running "install" command: `pnpm install`...
[02:03:04.366] Scope: all 4 workspace projects
[02:03:04.515] ../..                                    |  WARN  Ignoring not compatible lockfile at /vercel/path0/pnpm-lock.yaml
[02:03:04.563]  WARN  GET https://registry.npmjs.org/dotenv-cli error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
[02:03:04.563]  WARN  GET https://registry.npmjs.org/nuxt error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
[02:03:04.564]  WARN  GET https://registry.npmjs.org/vue error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
[02:03:04.564]  WARN  GET https://registry.npmjs.org/vue-router error (ERR_INVALID_THIS). Will retry in 10 seconds. 2 retries left.
[02:03:14.565]  WARN  GET https://registry.npmjs.org/dotenv-cli error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
[02:03:14.565]  WARN  GET https://registry.npmjs.org/nuxt error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
[02:03:14.565]  WARN  GET https://registry.npmjs.org/vue error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
[02:03:14.566]  WARN  GET https://registry.npmjs.org/vue-router error (ERR_INVALID_THIS). Will retry in 1 minute. 1 retries left.
[02:04:14.612]  ERR_PNPM_META_FETCH_FAIL  GET https://registry.npmjs.org/dotenv-cli: Value of "this" must be of type URLSearchParams
[02:04:14.622] Error: Command "pnpm install" exited with 1

[02:04:14.847] 

This is my file structure:
Screenshot 2024-04-02 at 08 12 26

My pnmp-workspace.yaml:

packages:
    - FE/*

package.json:

{
  "name": "freshnez-main-repo",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "packages": "dotenv -- pnpm --filter",
    "app": "pnpm packages @nuxt-monorepo/app",
    "start": "pnpm --stream -r run dev",
    "dev": "pnpm -r dev",
    "build": "pnpm -r build",
    "clean": "pnpm -r run clean"
  },
  "keywords": [],
  "author": "Moemen Hussein",
  "license": "ISC",
  "devDependencies": {
    "dotenv-cli": "^7.4.1"
  }
}

These are the settings that im overriding when deploying on vercel:
image

I don't know what Im doing wrong. (this is also my first time working with vercel).

Hope you can help. Thanks!

@serkodev
Copy link
Owner

serkodev commented Apr 8, 2024

Are you already enable corepack ?

Related issues:
pnpm/pnpm#6499
pnpm/pnpm#6424

@hgrias
Copy link

hgrias commented Apr 11, 2024

I have tried the solutions from the threads listed and am still getting deployment errors as seen in OP.

Using Astro, pnpm, node 20.x, packageManager set by corepack

@serkodev
Copy link
Owner

Since I don't have experience using Vercel, it might take some time to test. I have successfully compiled and published on Cloudflare Pages.

@Moemen02
Copy link
Author

Moemen02 commented Apr 12, 2024

Personally I've given up on hosting it on vercel. I've just put it in a docker container and hosting it on Heroku. But if someone knows how to host it on vercel. I would still like to know

@serkodev serkodev closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
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

3 participants