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

[PRO]: Installing pro dependencies using PNPM gives 404 error #5305

Closed
1 task done
heymartinadams opened this issue Jul 2, 2024 · 3 comments
Closed
1 task done
Labels
Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@heymartinadams
Copy link

heymartinadams commented Jul 2, 2024

Affected Packages

extension-ai, and others

Version(s)

2.9.2

Description of the Bug

I have the following .npmrc file:

node-linker=hoisted

@nessprim:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=[secret listed here]

@tiptap-pro:registry=https://registry.tiptap.dev/
//registry.tiptap.dev/:_authToken=[secret listed here]

Installing the tiptap-pro packages locally works fine. But when I install it via Vercel, I get the following error, and only for the @tiptap-pro registry, not for the unrelated @nessprim registry:

[12:35:46.710] ✅ - Build can proceed
[12:35:46.711] ✅ Building .npmrc file for prd environment
[12:36:06.655] Restored build cache
[12:36:06.733] Running "vercel build"
[12:36:10.036] Vercel CLI 34.2.8
[12:36:10.550] Detected `pnpm-lock.yaml` version 9 generated by pnpm 9
[12:36:10.581] Installing dependencies...
[12:36:11.217] Scope: all 15 workspace projects
[12:36:13.750] ../..                                    | +218  -24 ++++++++++++++++++++++--
[12:36:14.067] ../..                                    | Progress: resolved 0, reused 0, downloaded 1, added 0
[12:36:15.146] ../..                                    | Progress: resolved 0, reused 0, downloaded 13, added 0
[12:36:16.146] ../..                                    | Progress: resolved 0, reused 0, downloaded 14, added 0
[12:36:17.146] ../..                                    | Progress: resolved 0, reused 0, downloaded 21, added 0
[12:36:18.148] ../..                                    | Progress: resolved 0, reused 0, downloaded 35, added 0
[12:36:19.148] ../..                                    | Progress: resolved 0, reused 0, downloaded 37, added 2
[12:36:19.827]  ERR_PNPM_FETCH_404  GET https://registry.npmjs.org/@tiptap-pro/extension-drag-handle-react/-/extension-drag-handle-react-2.9.2.tgz: Not Found - 404
[12:36:19.827] 
[12:36:19.827] No authorization header was set for the request.
[12:36:19.991] Error: Command "pnpm install" exited with 1
[12:36:20.505] 

Browser Used

Chrome

Code Example (Preferred)

No response

Expected Behavior

I should be able to install the @tiptap-pro packages.

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@heymartinadams heymartinadams added Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Jul 2, 2024
@github-project-automation github-project-automation bot moved this to Triage open in Tiptap Jul 2, 2024
@heymartinadams heymartinadams changed the title [PRO]: Installing pro dependencies gives 404 error [PRO]: Installing pro dependencies using PNPM gives 404 error Jul 2, 2024
@heymartinadams
Copy link
Author

Note: even if I update the Vercel build command to include the following, I still get the same error:

pnpm config set --global "@tiptap-pro:registry" https://registry.tiptap.dev/ && pnpm build

@nperez0111
Copy link
Contributor

We don't do anything special for vercel. We need the auth token to be set for you to pull the extensions down. Please see: #4487 (comment)

@heymartinadams
Copy link
Author

heymartinadams commented Jul 2, 2024

For others running into this issue, I was able to resolve it like this:

  1. Be sure to add the TIPTAP token to your environment variables in Vercel: https://vercel.com/[team]/[project]/settings/environment-variables
  2. Add a vercel.sh file to your project
  3. Be sure to link to it from your team’s https://vercel.com/[team]/[project]/settings/git section:
    CleanShot 2024-07-02 at 13 17 33@2x
  4. Include the following:
#!/bin/bash

echo "BRANCH: $VERCEL_GIT_COMMIT_REF"

# If you want to limit deploys to your `main` branch only
if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]]; then
  # Proceed with the build
  echo "✅ - Build can proceed"

  # Add the npmrc configuration
  NPMRC_PATH="../../.npmrc"

  echo "node-linker=hoisted" >$NPMRC_PATH

  echo "✅ Building .npmrc file for $ENV environment"
  echo "@tiptap-pro:registry=https://registry.tiptap.dev" >>$NPMRC_PATH
  echo "//registry.tiptap.dev/:_authToken=${TIPTAP}" >>$NPMRC_PATH

  exit 1

else
  # Don't build
  echo "🛑 - Build cancelled"
  exit 0
fi

@github-project-automation github-project-automation bot moved this from Triage open to Done in Tiptap Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Pro The issue or pull request is related to the pro packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants